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
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
7
7
### New Features
8
8
9
9
- Added `add_attachment()` as a top level API, so you can do now: `sentry_sdk.add_attachment(...)` (up until now it was only available on the `Scope`)
10
+
- Added a new SDK option `exclude_span_origins`. Spans with an `origin` from `exclude_span_origins` won't be created. This can be used for example in dual OpenTelemetry/Sentry setups to filter out spans from specific Sentry instrumentations. Note that using `exclude_span_origins` might potentially lead to surprising results: if, for example, a root span is excluded based on `origin`, all of its children will become root spans, unless they were started with `only_as_child_span=True`.
10
11
11
12
### Changed
12
13
@@ -39,6 +40,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
39
40
- If you want to force creation of a new trace, use the `sentry_sdk.new_trace` context manager.
40
41
41
42
- 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`.
43
+
-`sentry_sdk.start_span` now takes an optional `only_as_child_span` argument. These spans will not be started if they would be root spans -- they can only exist as child spans. You can use this parameter to prevent spans without a parent from becoming root spans.
42
44
- The `Span()` constructor does not accept a `hub` parameter anymore.
43
45
-`Span.finish()` does not accept a `hub` parameter anymore.
44
46
-`Span.finish()` no longer returns the `event_id`if the event is sent to Sentry.
@@ -269,7 +271,7 @@ Looking to upgrade from Sentry SDK 1.x to 2.x? Here's a comprehensive list of wh
269
271
- The actual implementation of `get_current_span` was moved to `sentry_sdk.tracing_utils`. `sentry_sdk.get_current_span`is still accessible as part of the top-level API.
270
272
-`sentry_sdk.tracing_utils.add_query_source()`: Removed the `hub` parameter. It isnot necessary anymore.
271
273
-`sentry_sdk.tracing_utils.record_sql_queries()`: Removed the `hub` parameter. It isnot necessary anymore.
272
-
-`sentry_sdk.tracing_utils.get_current_span()`does now take a `scope` instead of a `hub`as parameter.
274
+
-`sentry_sdk.tracing_utils.get_current_span()` now takes a `scope` instead of a `hub`as parameter.
273
275
-`sentry_sdk.tracing_utils.should_propagate_trace()` now takes a `Client` instead of a `Hub`as first parameter.
274
276
-`sentry_sdk.utils.is_sentry_url()` now takes a `Client` instead of a `Hub`as first parameter.
275
277
-`sentry_sdk.utils._get_contextvars` does notreturn a tuplewith three values, but a tuplewith two values. The `copy_context` was removed.
0 commit comments