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
{{ message }}
Repository navigation
Commit 48a5db2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(otlp)!: Keep setup_propagator, default it to False
Follow the sentry-ruby approach (getsentry/sentry-ruby#3063) and keep
setup_propagator as an opt-in instead of removing it.
Co-Authored-By: Ivana Kellyer <ivana.kellyer@sentry.io>
Copy file name to clipboardExpand all lines: MIGRATION_GUIDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
52
52
- Whether the MCP integration records tool arguments, tool results, and prompt contents is now controlled by `data_collection`'s new `mcp` setting (`{"inputs": bool, "outputs": bool}`, both `True` by default) instead of the `gen_ai` setting.
53
53
- With `handled_tool_call_exceptions=True` (the default), the Pydantic AI integration now reports an error for every failed tool argument validation attempt, including retries. Previously, only one error was reported per tool call.
54
54
- The Pydantic AI integration no longer sets the `gen_ai.response.streaming` span attribute.
55
-
- The `OTLPIntegration` no longer sets up a propagator, and its`setup_propagator`option was removed. Distributed tracing now uses the propagators configured in OpenTelemetry (by default, W3C `traceparent` and `baggage`). If you need to propagate Sentry's `sentry-trace` and `baggage` headers, for example to talk to services instrumented with Sentry SDKs instead of OpenTelemetry, set up the `SentryOTLPPropagator` manually:
55
+
- The `OTLPIntegration` no longer sets up a propagator by default:`setup_propagator`now defaults to `False`. Distributed tracing now uses the propagators configured in OpenTelemetry (by default, W3C `traceparent` and `baggage`) instead of Sentry's `sentry-trace` and `baggage` headers. To get the old behavior back, set `OTLPIntegration(setup_propagator=True)`. To propagate both W3C and Sentry headers, set up the `SentryOTLPPropagator` manually instead:
56
56
57
57
```python
58
58
from opentelemetry.propagate import set_global_textmap
Propagator for the Sentry-specific ``sentry-trace`` and ``baggage`` headers.
135
-
136
-
The OTLPIntegration doesn't set up any propagator. OpenTelemetry's default
137
-
propagators (W3C ``traceparent`` and ``baggage``) are used unless configured
138
-
otherwise. If you need to continue traces from or propagate traces to services
139
-
that only understand Sentry's headers, set this propagator up manually with
140
-
``opentelemetry.propagate.set_global_textmap``.
141
-
142
135
!!! Note regarding baggage:
143
136
We cannot meaningfully populate a new baggage as a head SDK
144
137
when we are using OTLP since we don't have any sort of transaction semantic to
@@ -245,6 +238,8 @@ class OTLPIntegration(Integration):
245
238
Set to False to setup the TracerProvider manually.
246
239
:param collector_url: URL of your own OpenTelemetry collector, defaults to None.
247
240
When set, the exporter will send traces to this URL instead of the Sentry OTLP endpoint derived from the DSN.
241
+
:param setup_propagator: Replace the global OpenTelemetry propagator with the Sentry Propagator, defaults to False.
242
+
By default, the propagators configured in OpenTelemetry are used for Distributed Tracing.
248
243
:param capture_exceptions: Intercept and capture exceptions on the OpenTelemetry Span in Sentry as well, defaults to False.
249
244
Set to True to turn on capturing but be aware that since Sentry captures most exceptions, duplicate exceptions might be dropped by DedupeIntegration in many cases.
0 commit comments