Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sentry_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ def _get_options(*args: "Optional[str]", **kwargs: "Any") -> "Dict[str, Any]":
stacklevel=2,
)

if rv["trace_ignore_status_codes"] and has_span_streaming_enabled(rv):
warnings.warn(
"The `trace_ignore_status_codes` parameter is ignored in span streaming mode.",
stacklevel=2,
)

return rv


Expand Down
2 changes: 2 additions & 0 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,8 @@ def __init__(
If `trace_ignore_status_codes` is not provided, requests with any status code
may be traced.

This option has no effect in span streaming mode (`trace_lifecycle="stream"`).

:param strict_trace_continuation: If set to `True`, the SDK will only continue a trace if the `org_id` of the incoming trace found in the
`baggage` header matches the `org_id` of the current Sentry client and only if BOTH are present.

Expand Down
8 changes: 8 additions & 0 deletions sentry_sdk/integrations/sanic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import warnings
import weakref
from inspect import isawaitable
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -70,6 +71,13 @@ def __init__(
"""
self._unsampled_statuses = unsampled_statuses or set()

client = sentry_sdk.get_client()
if self._unsampled_statuses and has_span_streaming_enabled(client.options):
warnings.warn(
"The unsampled_statuses SanicIntegration option has no effect when span streaming is active.",
stacklevel=2,
)
Comment thread
sentrivana marked this conversation as resolved.
Outdated
Comment thread
sentrivana marked this conversation as resolved.
Outdated

@staticmethod
def setup_once() -> None:
SanicIntegration.version = parse_version(SANIC_VERSION)
Expand Down
Loading