You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION_GUIDE.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,20 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
24
24
- The default of `traces_sample_rate` changed to `0`. Meaning: Incoming traces will be continued by default. For example, if your frontend sends a `sentry-trace/baggage` headers pair, your SDK will create Spans and send them to Sentry. (The default used to be `None` meaning by default no Spans where created, no matter what headers the frontend sent to your project.) See also: https://docs.sentry.io/platforms/python/configuration/options/#traces_sample_rate
25
25
-`sentry_sdk.start_span` now only takes keyword arguments.
26
26
-`sentry_sdk.start_transaction`/`sentry_sdk.start_span` no longer takes the following arguments: `span`, `parent_sampled`, `trace_id`, `span_id` or `parent_span_id`.
27
-
-`sentry_sdk.continue_trace` no longer returns a `Transaction` and is now a context manager.
27
+
-`sentry_sdk.continue_trace` no longer returns a `Transaction` and is now a context manager.
28
+
29
+
- Use it to continue an upstream trace with the `sentry-trace` and `baggage` headers.
with sentry_sdk.start_span(name="continued span in trace"):
35
+
pass
36
+
```
37
+
38
+
- If the headers are empty, a new trace will be started.
39
+
- If you want to force creation of a new trace, use the `sentry_sdk.new_trace` context manager.
40
+
28
41
- You can no longer change the sampled status of a span with`span.sampled = False` after starting it. The sampling decision needs to be either be made in the `traces_sampler`, or you need to pass an explicit `sampled` parameter to `start_span`.
29
42
- The `Span()` constructor does not accept a `hub` parameter anymore.
30
43
-`Span.finish()` does not accept a `hub` parameter anymore.
@@ -227,7 +240,6 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
227
240
### Deprecated
228
241
229
242
-`sentry_sdk.start_transaction()`is deprecated. Use `sentry_sdk.start_span()` instead.
230
-
- If you want to force creation of a new trace, use the `sentry_sdk.new_trace()` context manager.
231
243
-`Span.set_data()`is deprecated. Use `Span.set_attribute()` instead.
0 commit comments