Skip to content

chore: Document the three OpenTelemetry setups in the migration guide - #23149

Merged
andreiborza merged 16 commits into
developfrom
ab/document-otel-setups
Aug 7, 2026
Merged

chore: Document the three OpenTelemetry setups in the migration guide#23149
andreiborza merged 16 commits into
developfrom
ab/document-otel-setups

Conversation

@andreiborza

@andreiborza andreiborza commented Aug 7, 2026

Copy link
Copy Markdown
Member

What

Restructures the "Better OpenTelemetry interoperability" section of the v11 migration guide around the three setups users can actually run, so people can find the one that matches them instead of piecing it together from prose.

  • Sentry only, OpenTelemetry ignored (the new default): native Sentry spans, no tracer provider, @opentelemetry/api spans ignored.
  • OpenTelemetry-compatible mode (skipOpenTelemetrySetup: false): a minimal tracer provider picks up @opentelemetry/api spans and turns them into Sentry spans. Everything goes to Sentry and only to Sentry.
  • Your own OpenTelemetry, Sentry linked to it: Sentry tracing off, otlpIntegration() for trace linking, getOtlpTracesEndpoint() to point your exporter at Sentry.

Also adds an "Avoiding duplicate spans" subsection covering what happens when Sentry's instrumentation overlaps with your own, and spells out that the v10 bridge built from SentryContextManager, SentrySampler and SentrySpanProcessor is gone.

This replaces the prose that previously covered skipOpenTelemetrySetup, the removed bridge and the HTTP/fetch example, rather than adding alongside it. Everything unique from that block is preserved: the flipped default and per-SDK lists, and the v10 change where skipOpenTelemetrySetup: true no longer disables HTTP and fetch spans.

Why

The old section explained the mechanism but never said which configuration a given user wants, so the common questions (does Sentry pick up my OpenTelemetry spans, do I get duplicates, where did SentrySpanProcessor go) had to be inferred. Naming the three setups makes that a lookup.

Note this touches the same region as #23099, which adds its own OTLP integration section, so one of the two will need a rebase.

@andreiborza
andreiborza requested a review from nicohrubec August 7, 2026 10:57
@andreiborza
andreiborza force-pushed the ab/document-otel-setups branch from e0e630c to d28ed78 Compare August 7, 2026 12:31
@andreiborza
andreiborza marked this pull request as ready for review August 7, 2026 12:45
@andreiborza
andreiborza requested review from Lms24 and chargome August 7, 2026 12:45

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing this, got a few comments but mostly suggestions

Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md
Co-authored-by: Nicolas Hrubec <nicolas.hrubec@outlook.com>

@chargome chargome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd trim this down generally a bit more, but LGTM otherwise

Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this reads very clearly. I think my main points from the review are:

  • we should make it clear at the beginning if a user needs to care about this section or not
  • we should be consistent with "you" and "users"

Otherwise LGTM

Comment thread MIGRATION.md

### Better OpenTelemetry interoperability

Affected SDKs: Server-side SDKs (`@sentry/node` and all dependents).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Should we add this so that users/agents can quickly spot if this concerns them?

Suggested change
Affected SDKs: Server-side SDKs (`@sentry/node` and all dependents). **If Sentry is used with a custom OpenTelemetry SDK Setup**

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this affects v11 as a whole, not just user's with custom otel setups.

Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated

#### Choosing an OpenTelemetry setup

There are three ways to run the two together, and which one you want depends on who should own spans. This is controlled by the existing `skipOpenTelemetrySetup` option, whose default was flipped in v11: it is now `true` for most server SDKs (including `@sentry/node`, `@sentry/bun`, the serverless SDKs and `@sentry/cloudflare`) and `false` for `@sentry/nextjs` and `@sentry/sveltekit`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are three ways to run the two together, and which one you want depends on who should own spans. This is controlled by the existing `skipOpenTelemetrySetup` option, whose default was flipped in v11: it is now `true` for most server SDKs (including `@sentry/node`, `@sentry/bun`, the serverless SDKs and `@sentry/cloudflare`) and `false` for `@sentry/nextjs` and `@sentry/sveltekit`.
There are three ways to run the Sentry and OTel SDKs together, and which one you want depends on who should own spans. This is controlled by the existing `skipOpenTelemetrySetup` option, whose default was flipped in v11: it is now `true` for most server SDKs (including `@sentry/node`, `@sentry/bun`, the serverless SDKs and `@sentry/cloudflare`) and `false` for `@sentry/nextjs` and `@sentry/sveltekit`.

Comment thread MIGRATION.md Outdated
Comment thread MIGRATION.md Outdated
This is what `@sentry/nextjs` and `@sentry/sveltekit` do by default, because those frameworks emit OpenTelemetry spans that would otherwise be lost.

#### Connecting Sentry to your OpenTelemetry traces
Everything goes to Sentry and only to Sentry. This is not a general OpenTelemetry pipeline: there is no exporter, no OTLP output, and no way to fan spans out to another backend. Sentry also refuses to register its provider if you already registered one of your own, logging a warning instead. If you want a real OpenTelemetry pipeline, use setup 3.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very technically, and probably fine to omit here, users could still roll their own transport and fan out to other tracing backends. But I think we discussed this already so probably not worth mentioning here.

andreiborza and others added 6 commits August 7, 2026 15:12
Drops the Next.js/SvelteKit note from setup 2, since setup 1 already points readers there when a
library emits its own OpenTelemetry spans, and reword setup 3's opening.
Co-authored-by: Nicolas Hrubec <nicolas.hrubec@outlook.com>
Co-authored-by: Charly Gomez <charly.gomez1310@gmail.com>
Co-authored-by: Nicolas Hrubec <nicolas.hrubec@outlook.com>
Co-authored-by: Nicolas Hrubec <nicolas.hrubec@outlook.com>
Comment thread MIGRATION.md Outdated
andreiborza and others added 4 commits August 7, 2026 15:26
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Name both SDKs in the intro, and drop the claim that spans cannot be fanned out to another
backend, since a custom transport can still do that.

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

splendid

Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
@andreiborza
andreiborza merged commit 3b37a8d into develop Aug 7, 2026
38 checks passed
@andreiborza
andreiborza deleted the ab/document-otel-setups branch August 7, 2026 13:56
nicohrubec added a commit that referenced this pull request Aug 7, 2026
Merge develop's restructured "Better OpenTelemetry interoperability" section
(three named setups, from #23149), remove the trailing TODO(v11) OpenTelemetry
guide link for the user-facing alpha, and refresh the end-state copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants