Skip to content

docs: Add missing OTLP integration docs and fix drift across SDKs#18441

Merged
dingsdax merged 34 commits into
masterfrom
docs/otlp-integration-drift
Jul 7, 2026
Merged

docs: Add missing OTLP integration docs and fix drift across SDKs#18441
dingsdax merged 34 commits into
masterfrom
docs/otlp-integration-drift

Conversation

@dingsdax

@dingsdax dingsdax commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

closes getsentry/sentry-dotnet#5190

DESCRIBE YOUR PR

  • 4 SDKs shipped OTLP support with no docs
  • 2 legacy pages lacked deprecation alerts
  • overview page still listed Go/PHP as "Coming Soon"
  • existing Go/Java docs had stale version numbers and incorrect config

Overview of changes

New documentation pages:

  • PHP OTLP integration (docs/platforms/php/common/integrations/otlp/)
  • .NET OTLP integration (docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx)
  • Symfony OTLP integration (docs/platforms/php/guides/symfony/integrations/otlp.mdx)
  • Laravel OTLP integration (docs/platforms/php/guides/laravel/integrations/otlp.mdx)

Deprecation alerts added:

  • Python legacy OpenTelemetry page: strengthened from "New Integration Option" to formal deprecation warning
  • Ruby legacy OpenTelemetry page: same treatment
  • .NET legacy OpenTelemetry page: new deprecation alert pointing to OTLP exporter docs

Hub page updated:

  • docs/concepts/otlp/sentry-with-otel.mdx: removed "Coming Soon" section, added .NET, Go, Java, PHP, Laravel, Symfony (9 SDKs total, alphabetical)

Existing docs corrected:

  • Go: updated version floors (Go 1.25+, sentry-go 0.47.0+, OTel 1.43.0+), changed "deprecated" to "removed" for NewSentrySpanProcessor
  • Java: fixed otel.propagators from sentry to tracecontext,baggage,sentry (matching official SDK samples)

Per-SDK changes

PHP (sentry-php, sentry-symfony, sentry-laravel)

New pages:

  • docs/platforms/php/common/integrations/otlp/index.mdx
    • Documents OTLPIntegration class
    • Install: open-telemetry/sdk, open-telemetry/exporter-otlp
    • Options: setupOtlpTracesExporter, collectorUrl
    • Supported versions: PHP 8.1+, sentry/sentry 4.23.0+
  • docs/platforms/php/guides/symfony/integrations/otlp.mdx
    • Symfony bundle YAML config with auto-service registration
    • Links to parent PHP page for options
    • Requires sentry-symfony ^5.10
  • docs/platforms/php/guides/laravel/integrations/otlp.mdx
    • Laravel config/sentry.php config using ::class pattern
    • Links to parent PHP page for options
    • Requires sentry-laravel ^4.25

Verification: all code examples checked against sentry-php OTLPIntegration.php constructor, sentry-symfony test fixtures, and sentry-laravel ServiceProvider source.

.NET (sentry-dotnet)

New page:

  • docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx
    • Documents Sentry.OpenTelemetry.Exporter NuGet package
    • AddSentryOtlpExporter(dsn) and UseOtlp() extension methods
    • Options: dsnString, collectorUrl (Uri), defaultTextMapPropagator
    • Supported versions: .NET 6.0+, OTel 1.15.0+

Updated page:

  • docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry.mdx
    • Added deprecation alert pointing to new OTLP docs
    • Renamed title to "OpenTelemetry Support (Deprecated)"

Verification: checked against SentryTracerProviderBuilderExtensions.cs, SentryOptionsExtensions.cs, and official console/ASP.NET Core samples.

Python (sentry-python)

Updated page:

Verification: existing OTLP docs confirmed correct against sentry_sdk/integrations/otlp.py.

Ruby (sentry-ruby)

Updated page:

  • docs/platforms/ruby/common/tracing/instrumentation/opentelemetry.mdx
    • Changed alert from "New Integration Option" to formal deprecation warning
    • Renamed title to "OpenTelemetry Support (Deprecated)"

Verification: existing OTLP docs confirmed correct against sentry-opentelemetry gem source.

Go (sentry-go)

Updated pages:

  • platform-includes/performance/opentelemetry-install/go.mdx
    • Corrected version requirements:
      • Go 1.18 → 1.25+
      • sentry-go 0.18.0 → 0.47.0+
      • OTel 1.11.0 → 1.43.0+
  • docs/platforms/go/common/tracing/instrumentation/opentelemetry.mdx
    • Changed "Span Processor Deprecation" to "Span Processor Removed"
    • NewSentrySpanProcessor and NewSentryPropagator were fully removed in v0.47.0

Verification: checked against otel/otlp/span_exporter.go, otel/go.mod, and _examples/otlp/main.go.

Java (sentry-java)

Updated page:

  • docs/platforms/java/common/opentelemetry/setup/otlp.mdx
    • Fixed otel.propagators in both plain Java and Spring Boot examples:
      • Before: sentry
      • After: tracecontext,baggage,sentry
    • Without tracecontext,baggage, W3C traceparent propagation is lost

Verification: all code examples confirmed correct against sentry-opentelemetry-otlp module source and sample apps.

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.):
  • Other deadline:
  • 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

dingsdax and others added 11 commits June 16, 2026 13:23
Document the OTLPIntegration for the PHP SDK, covering install,
configuration, behavior, options (setup_otlp_traces_exporter,
collector_url), and supported versions. The integration was added
in sentry-php 4.23.0 (PR getsentry/sentry-php#2030) but had no
corresponding documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the new Sentry.OpenTelemetry.Exporter NuGet package with
AddSentryOtlpExporter(dsn) and UseOtlp() extension methods. The
package was added in sentry-dotnet PR getsentry/sentry-dotnet#4899
(May 2026) but had no corresponding documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document Symfony-specific configuration for the OTLPIntegration
introduced in sentry-symfony 5.4 (PR getsentry/sentry-symfony#1014).
References the PHP OTLP integration docs for shared behavior and
options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document Laravel-specific configuration for the OTLPIntegration
introduced in sentry-laravel 4.15 (PR getsentry/sentry-laravel#1122).
References the PHP OTLP integration docs for shared behavior and
options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the alert from "New Integration Option" to a deprecation
warning. OpenTelemetryIntegration was formally deprecated in favor of
OTLPIntegration in sentry-python PR getsentry/sentry-python#6494
(June 2026).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark the Sentry.OpenTelemetry SpanProcessor approach as deprecated
in favor of the new Sentry.OpenTelemetry.Exporter OTLP package,
matching the deprecation pattern used on the Python and Ruby legacy
OTel pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the "Coming Soon" section and add .NET, Go, Java, PHP,
Laravel, and Symfony to the OTLP Integration list alongside the
existing Node.js, Python, and Ruby entries. All listed SDKs now
have shipped OTLP support and have corresponding documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix wrong package name open-telemetry/transport-grumphp in PHP,
  Symfony, and Laravel install sections (package does not exist)
- Fix undeclared serviceName variable in .NET code example
- Add missing Supported Versions section to .NET OTLP page
- Fix missing trailing slash on Python PlatformLink
- Mark Ruby legacy OTel page as deprecated (was still using soft
  "New Integration Option" alert)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix Symfony minimum version: ^5.10 not ^5.4 (OTLPIntegration
  service registration was added in 5.10.0)
- Fix Laravel minimum version: ^4.25 not ^4.15 (OTLPIntegration
  support was added in 4.25.0)
- Fix PHP version requirement: 8.1+ not 7.2+ (OpenTelemetry SDK
  requires PHP 8.1)
- Use camelCase option names to match actual PHP constructor params
  (setupOtlpTracesExporter, collectorUrl)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Go:
- Update version requirements: Go 1.25+, sentry-go 0.47.0+, OTel
  1.43.0+ (were 1.18, 0.18.0, 1.11.0)
- Update alert: NewSentrySpanProcessor/NewSentryPropagator were
  removed in v0.47.0, not just deprecated

Java:
- Add tracecontext,baggage to otel.propagators alongside sentry in
  both plain Java and Spring Boot examples, matching official SDK
  samples. Without these, W3C traceparent propagation is lost.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change "Legacy OpenTelemetry Support" to "OpenTelemetry Support
(Deprecated)" for consistency with the Python and Ruby deprecated
OTel pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Jul 7, 2026 9:02pm
sentry-docs Ready Ready Preview, Comment Jul 7, 2026 9:02pm

Request Review

dingsdax and others added 2 commits June 16, 2026 14:02
The anchor #instrumentation doesn't exist on the getting-started page.
Use the dedicated instrumentation page URL instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread docs/platforms/php/guides/symfony/integrations/otlp.mdx Outdated
dingsdax and others added 2 commits June 16, 2026 14:25
Without fallbackPlatform="php", PlatformLink resolves relative to the
guide URL instead of the parent platform, producing broken links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Order platforms by adoption/maturity and group PHP SDKs (PHP,
Laravel, Symfony) together instead of scattering them alphabetically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Normalize Python Behavior section to match Ruby/PHP wording (tense,
verb form, specific tracing options in 'Do not' warning). Simplify
concepts page intro and break up long sentence in Exporters section.
Lowercase 'propagator' and 'distributed tracing' in Python/Ruby options.
Add missing Supported Versions section to Symfony OTLP page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* An OTLP exporter that automatically configures the ingestion endpoint from your Sentry DSN. This enables tracing in Sentry. **Note:** _Do not_ also set up tracing via the Sentry SDK (i.e. do not set `TracesSampleRate`).
* A `SentryPropagator` that injects `sentry-trace` and `baggage` headers alongside the standard W3C `traceparent`, ensuring [distributed tracing](/concepts/key-terms/tracing/distributed-tracing/) works (see note below)
* A `SentryPropagator` that injects `sentry-trace` and `baggage` headers alongside the standard W3C `traceparent` for compatibility with services using Sentry's native tracing (see note below)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Our current plan is to remove this (per the dev docs):

The OTEL SDK in .NET only allows one propagator to be configured so an alternative would be to configure a composite propagator that did both the W3C and the Sentry propagation. I'm not sure if we want to do that by default though, since the user may have their own propagators configured (and this contradicts the behaviour currently described in the dev docs).

Another alternative would be just to document how users can configure such a composite propagator (we provide the public types but don't wire them up by default).

Yet another alternative would be to provide an extension method that let's users do this easily (and also wrap any of their own custom propagators so that these are included in the composite).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes that's the plan, we will remove the automatic propagator and align all SDKs this way, hence the Alert, which was admittingly at the wrong placing on the page

The alert was buried under the defaultTextMapPropagator option,
which is an advanced override most users never look at. Move it to
the Behavior section next to the SentryPropagator bullet where users
actually learn about the automatic propagator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines 1 to 6
<Alert>

OpenTelemetry integration was added in `sentry-go` version 0.18.0, and works only for Go >= 1.18.

</Alert>

<Alert>

The Sentry Go OpenTelemetry integration requires `go.opentelemetry.io/otel` (and its submodules), version `1.11.0` or higher.
The OTLP-based OpenTelemetry integration requires `sentry-go` v0.45.0+, Go >= 1.25, and `go.opentelemetry.io/otel` v1.40.0+.

</Alert>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The Go OpenTelemetry installation guide specifies an outdated sentry-go version (v0.45.0+), which will cause runtime failures due to removed APIs in the required newer versions.
Severity: MEDIUM

Suggested Fix

Update the version constraints in platform-includes/performance/opentelemetry-install/go.mdx to reflect the actual minimum requirements. Change sentry-go v0.45.0+ to sentry-go v0.47.0+ and go.opentelemetry.io/otel v1.40.0+ to go.opentelemetry.io/otel v1.43.0+.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: platform-includes/performance/opentelemetry-install/go.mdx#L1-L6

Potential issue: The documentation file
`platform-includes/performance/opentelemetry-install/go.mdx` specifies outdated version
requirements for Go dependencies. It instructs users to install `sentry-go v0.45.0+` and
`go.opentelemetry.io/otel v1.40.0+`. However, the documented OpenTelemetry setup
requires `sentry-go v0.47.0+` due to breaking changes in that version, specifically the
removal of `NewSentrySpanProcessor()` and `NewSentryPropagator()`. Users following the
current instructions with an older `sentry-go` version like `v0.45.0` will encounter
runtime failures, as the code they are instructed to use relies on APIs that no longer
exist in the required version.

dingsdax and others added 5 commits July 6, 2026 13:51
Add ^4.25 version constraint to the Laravel OTLP composer require command
to match the documented minimum version. Without this, users with an
existing composer.lock at an older version get a no-op install and hit
a runtime error when the OTLPIntegration support is missing.

Replace PlatformLink with direct links to the base PHP OTLP page on
both the Laravel and Symfony guide pages. The PlatformLink component
resolves to the current page because guide-level OTLP files exist in
the fallback chain, making the options link self-referential.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The OpenTelemetry Ruby docs do not have a standalone propagation page.
Point to the Context Propagation section on the instrumentation page
instead, which covers propagator configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include tracecontext and baggage in the Java Spring Boot agentless
propagator config. Setting otel.propagators=sentry alone replaces the
default W3C propagators, silently breaking cross-service tracing with
non-Sentry services. All sentry-java samples use the full list.

Add a Supported Versions section to the .NET OTLP page for consistency
with PHP, Python, and Ruby OTLP pages which all have one.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The release registry has a dedicated key for each .NET package.
Use sentry.dotnet.opentelemetry.exporter instead of the base
sentry.dotnet key to match the convention used by every other
.NET package install command in the docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The otel/otlp/go.mod in sentry-go v0.47.0 requires
go.opentelemetry.io/otel v1.43.0, not v1.40.0 as previously stated.
The sentry-go v0.45.0+ minimum remains correct since that is when
the OTLP exporter APIs were introduced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The dedicated sentry.dotnet.opentelemetry.exporter key exists in
the per-package API but is absent from the bulk /sdks endpoint that
the build fetches. Since all .NET Sentry packages are versioned in
lockstep, sentry.dotnet resolves correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread docs/platforms/php/guides/symfony/integrations/otlp.mdx

```csharp
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.AddSource("MyApp") // the name of your ActivitySource

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not necessarily a problem - just a comment:

 .AddSource("MyApp") // the name of your ActivitySource

We don't necessarily need this... the SDK user would need this if they want to add their own custom spans/instrumentation - but OTEL and OTLP can be used without this to capture spans from other libraries (e.g. the stuff emitted by OpenTelemetry.Instrumentation.Http).

We can leave this in there (anyone who is familiar with OTEL will understand it's significance - it's not part of the Sentry SDK)... or we could leave it out. It can confuse people who are new to OTEL. I don't have strong opinions either way.

@jamescrosswell jamescrosswell self-requested a review July 7, 2026 07:29

@jamescrosswell jamescrosswell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

The base Symfony and Laravel guides already assume sentry/sentry-symfony
and sentry/sentry-laravel are installed. Listing them again in the OTLP
integration install section is redundant and could confuse readers into
thinking a separate install step is needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
<Alert>

The Sentry Go OpenTelemetry integration requires `go.opentelemetry.io/otel` (and its submodules), version `1.11.0` or higher.
The OTLP-based OpenTelemetry integration requires `sentry-go` v0.45.0+, Go >= 1.25, and `go.opentelemetry.io/otel` v1.43.0+.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The documentation incorrectly states a requirement of Go >= 1.25. This is likely a typo, as the actual minimum version is probably Go >= 1.21.
Severity: MEDIUM

Suggested Fix

Verify the actual minimum Go version required by the sentry-go SDK, which is likely Go >= 1.21 or Go >= 1.18. Update the documentation at platform-includes/performance/opentelemetry-install/go.mdx to reflect the correct version requirement.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: platform-includes/performance/opentelemetry-install/go.mdx#L3

Potential issue: The documentation at
`platform-includes/performance/opentelemetry-install/go.mdx` was updated to state a
minimum Go version requirement of `Go >= 1.25`. This is almost certainly a typo, as the
commit message only mentions an OpenTelemetry dependency update, not a major Go version
jump. The actual minimum version required by the SDK is likely `Go >= 1.21` or `Go >=
1.18`. This incorrect documentation will mislead users with compatible Go versions
(e.g., 1.21-1.24) into believing they cannot use the OTLP integration, potentially
blocking its adoption.

@dingsdax dingsdax merged commit 654034f into master Jul 7, 2026
24 checks passed
@dingsdax dingsdax deleted the docs/otlp-integration-drift branch July 7, 2026 21:12
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.

docs: update with new OTLP-based Sentry.OpenTelemetry.Exporter package

7 participants