Skip to content

Commit 76467e4

Browse files
update docstring
1 parent faece2f commit 76467e4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sentry_sdk/traces.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,10 @@ def _get_current_streamed_span(
761761
scope: "Optional[sentry_sdk.Scope]" = None,
762762
) -> "Optional[StreamedSpan]":
763763
"""
764-
Returns the currently active span if there is one running, otherwise `None`
764+
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()`.
765768
"""
766769
scope = scope or sentry_sdk.get_current_scope()
767770
current_span = scope.streamed_span

0 commit comments

Comments
 (0)