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
feat(develop): Add capture_exceptions section to OTLP (#15838)
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
The arguments `setup_otlp_traces_exporter`and `setup_propagator` MUST be booleans that default to `True` and can be turned off if needed by the user.
29
+
The arguments `setup_otlp_traces_exporter`, `setup_propagator`and `capture_exceptions` MUST be booleans that default to `True`, `True` and `False` respectively and can be turned off if needed by the user.
30
30
31
31
It MUST consist of and setup the following components:
32
32
33
33
* A `SpanExporter` that automatically configures the OTLP ingestion endpoint from the DSN
34
34
* A `Propagator` that ensures Distributed Tracing works with other upstream and downstream services using Sentry SDKs
35
35
* Note that we use the `sentry-trace` (NOT `traceparent`) and `baggage` headers here
36
36
* An `external_propagation_context` that extracts the active `trace_id` and `span_id` from the OpenTelemetry SDK
37
+
* An interceptor for OpenTelemetry's `Span.record_exception` method that sends those exceptions to Sentry
37
38
38
39
### SpanExporter
39
40
@@ -93,6 +94,16 @@ See the reference Python implementation:
OpenTelemetry users and instrumentation use `Span.record_exception` to record exceptions on spans during the execution flow. For convenience, where possible, we
100
+
setup a monkeypatch for this method that intercepts and reports this exception to Sentry as well IF `capture_exceptions` is enabled on the integration.
101
+
102
+
Caveat: Most of the time, some existing Sentry integration will capture those exceptions too so depending on which one is captured first, the `DedupeIntegration` will typically drop either the Sentry or the OpenTelemetry captured exception which is fine from a product experience POV.
0 commit comments