Skip to content

Commit 89320ff

Browse files
authored
docs: Update span streaming docstrings (#7463)
We still say span streaming is experimental. That's not true anymore.
1 parent a618e3a commit 89320ff

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

‎sentry_sdk/traces.py‎

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
"""
2-
EXPERIMENTAL. Do not use in production.
2+
The API in this file is only meant to be used in span streaming mode. It should
3+
not be mixed with the legacy tracing API (sentry_sdk.start_transaction,
4+
sentry_sdk.start_span, etc.).
35
4-
The API in this file is only meant to be used in span streaming mode.
6+
You can enable span streaming mode via:
57
6-
You can enable span streaming mode via
7-
sentry_sdk.init(trace_lifecycle="stream").
8+
```
9+
import sentry_sdk
10+
11+
sentry_sdk.init(
12+
trace_lifecycle="stream",
13+
)
14+
```
15+
16+
See
17+
https://docs.sentry.io/platforms/python/tracing/streamed-spans/migration-guide/
18+
for how to migrate to span streaming.
819
"""
920

1021
import sys
@@ -110,10 +121,7 @@ def start_span(
110121
active: bool = True,
111122
) -> "StreamedSpan":
112123
"""
113-
Start a span.
114-
115-
EXPERIMENTAL. Use sentry_sdk.start_transaction() and sentry_sdk.start_span()
116-
instead.
124+
Start a span in streaming mode.
117125
118126
The span's parent, unless provided explicitly via the `parent_span` argument,
119127
will be the current active span, if any. If there is none, this span will
@@ -185,9 +193,7 @@ def start_span(
185193

186194
def continue_trace(incoming: "dict[str, Any]") -> None:
187195
"""
188-
Continue a trace from headers or environment variables.
189-
190-
EXPERIMENTAL. Use sentry_sdk.continue_trace() instead.
196+
Continue a trace from headers or environment variables in streaming mode.
191197
192198
This function sets the propagation context on the scope. Any span started
193199
in the updated scope will belong under the trace extracted from the
@@ -211,9 +217,7 @@ def continue_trace(incoming: "dict[str, Any]") -> None:
211217

212218
def new_trace() -> None:
213219
"""
214-
Resets the propagation context, forcing a new trace.
215-
216-
EXPERIMENTAL.
220+
Resets the propagation context, forcing a new trace, in streaming mode.
217221
218222
This function sets the propagation context on the scope. Any span started
219223
in the updated scope will start its own trace.
@@ -811,9 +815,7 @@ def trace(
811815
active: bool = True,
812816
) -> "Union[Callable[P, R], Callable[[Callable[P, R]], Callable[P, R]]]":
813817
"""
814-
Decorator to start a span around a function call.
815-
816-
EXPERIMENTAL. Use @sentry_sdk.trace instead.
818+
Decorator to start a span around a function call in streaming mode.
817819
818820
This decorator automatically creates a new span when the decorated function
819821
is called, and finishes the span when the function returns or raises an exception.

0 commit comments

Comments
 (0)