Skip to content

Commit 7bf887a

Browse files
feat(python): Add OTLPIntegration options (#15839)
## 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) --------- Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
1 parent ca89272 commit 7bf887a

File tree

1 file changed

+24
-1
lines changed
  • docs/platforms/python/integrations/otlp

1 file changed

+24
-1
lines changed

docs/platforms/python/integrations/otlp/index.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,33 @@ sentry_sdk.init(
5656

5757
Under the hood, the `OTLPIntegration` will setup the following parts:
5858

59-
* A [`SpanExporter`](https://opentelemetry.io/docs/concepts/components/#exporters) that will automatically setup the OTLP ingestion endpoint from your Sentry DSN. This enables tracing in Sentry. **Note:** _Do not_ also set up tracing via the Python SDK.
59+
* A [`SpanExporter`](https://opentelemetry.io/docs/concepts/components/#exporters) that will automatically setup the OTLP ingestion endpoint from your Sentry DSN. This enables tracing in Sentry. **Note:** _Do not_ also set up tracing via the Python SDK.
6060
* A [`Propagator`](https://opentelemetry.io/docs/concepts/context-propagation/#propagation) that ensures [distributed tracing](/concepts/key-terms/tracing/distributed-tracing/) works
6161
* Trace/Span linking for all other Sentry events such as Errors, Logs, Crons and Metrics
6262

63+
## Options
64+
65+
You can pass the following keyword arguments to `OTLPIntegration()`:
66+
67+
68+
- `setup_otlp_traces_exporter`:
69+
70+
Automatically configure an Exporter to send OTLP traces to the right project from the DSN, defaults to `True`.
71+
72+
Set to `False` if using a custom collector or to setup the TracerProvider manually.
73+
74+
- `setup_propagator`:
75+
76+
Automatically configure the Sentry Propagator for Distributed Tracing, defaults to `True`.
77+
78+
Set to `False` to configure propagators manually or to disable propagation.
79+
80+
- `capture_exceptions`:
81+
82+
Set to `True` to intercept and capture exceptions on the OpenTelemetry Span recorded with `Span.record_exception` in Sentry as well, defaults to `False`.
83+
84+
Caveat: Since Sentry already captures most exceptions, duplicate exceptions might be dropped by [`DedupeIntegration`](/platforms/python/integrations/default-integrations/#deduplication) but that should not affect your overall product experience on the [Issues](/product/issues) page.
85+
6386
## Supported Versions
6487

6588
- Python: 3.7+

0 commit comments

Comments
 (0)