We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent faece2f commit 76467e4Copy full SHA for 76467e4
1 file changed
sentry_sdk/traces.py
@@ -761,7 +761,10 @@ def _get_current_streamed_span(
761
scope: "Optional[sentry_sdk.Scope]" = None,
762
) -> "Optional[StreamedSpan]":
763
"""
764
- Returns the currently active span if there is one running, otherwise `None`
+ Returns the currently active span on the scope if the span is a `StreamedSpan`, otherwise `None`.
765
+
766
+ This function will only return a non-`None` value when the streaming trace lifecycle is enabled.
767
+ To enable the lifecycle, pass `_experiments={"trace_lifecycle": "stream"}` to `sentry.init()`.
768
769
scope = scope or sentry_sdk.get_current_scope()
770
current_span = scope.streamed_span
0 commit comments