Skip to content

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

Open
dingsdax wants to merge 23 commits into
masterfrom
docs/otlp-integration-drift
Open

docs: Add missing OTLP integration docs and fix drift across SDKs#18441
dingsdax wants to merge 23 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)
sentry-docs Ready Ready Preview, Comment Jun 30, 2026 2:35pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 30, 2026 2:35pm

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>

@adinauer adinauer 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.

Java changes LGTM

@Flash0ver Flash0ver 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.

Review for docs/platforms/dotnet/:

Comment thread docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx Outdated
Comment thread docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx Outdated
Comment thread docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx Outdated
Comment thread docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx Outdated
Comment thread platform-includes/performance/opentelemetry-install/go.mdx Outdated
dingsdax and others added 2 commits June 17, 2026 11:40
…etry-otlp.mdx

Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Giannis Gkiortzis <58184179+giortzisg@users.noreply.github.com>
@codeowner-assignment codeowner-assignment Bot requested a review from a team June 17, 2026 18:41
…etry-otlp.mdx

Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
@dingsdax dingsdax requested review from Litarnus and removed request for stayallive June 17, 2026 18:41
Reorder sidebar so both OpenTelemetry pages are adjacent:
- performance-metrics.mdx stays at sidebar_order 20
- opentelemetry.mdx moves to sidebar_order 21
- opentelemetry-otlp.mdx moves to sidebar_order 22

Add version injection to dotnet add package command and remove
inaccurate Supported Versions section for consistency with other
.NET docs.

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

```bash
composer require \
sentry/sentry-laravel:"^4.25" \

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.

nit: I think we should have a ## Supported Versions section here too instead of implicitly specifying the version

Comment thread docs/platforms/php/guides/symfony/integrations/otlp.mdx

@Flash0ver Flash0ver 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.

platforms/dotnet/

Comment thread docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry-otlp.mdx Outdated
Add warning alerts to Python, Ruby, and .NET OTLP pages noting that
the automatic propagator setup will be removed in the next major
version, with links to the OpenTelemetry propagation API docs.

Also add a Supported Versions section to the PHP/Laravel OTLP page
and move the version constraint out of the install command to match
the format used by other SDK OTLP pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add an 'Exporters, Event Linking, and Propagation' section to the
Sentry-with-OTel concepts page explaining the three distinct mechanisms
that make traces work in Sentry. Reword propagator bullets on Python,
Ruby, and .NET pages to clarify the Sentry propagator is for native-
tracing compatibility, not a requirement for distributed tracing. Add a
trailing note on all platform OTLP pages linking to the new section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines +20 to +23
composer require \
sentry/sentry-laravel \
open-telemetry/sdk \
open-telemetry/exporter-otlp

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 composer require command for the Laravel OTLP integration guide is missing the required version constraint for sentry/sentry-laravel, which can lead to installing an incompatible version.
Severity: MEDIUM

Suggested Fix

Update the composer require command in the Laravel OTLP integration guide to include the minimum version constraint. Change sentry/sentry-laravel to sentry/sentry-laravel:"^4.25". This ensures Composer installs a compatible version.

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: docs/platforms/php/guides/laravel/integrations/otlp.mdx#L20-L23

Potential issue: The Laravel OTLP integration documentation specifies that
`sentry/sentry-laravel: 4.25.0+` is required, but the provided `composer require`
command does not enforce this version. If a user's environment resolves to an older
version (e.g., due to an existing `composer.lock` file), they will install an
incompatible package. This will cause a `ClassNotFoundException` at runtime when the
application tries to use `\Sentry\Integration\OTLPIntegration`, which does not exist in
versions prior to 4.25.0.


## Options

For details on available options (`setupOtlpTracesExporter`, `collectorUrl`), see the <PlatformLink to="/integrations/otlp/" fallbackPlatform="php">OTLP integration docs</PlatformLink>.

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 PlatformLink component on the OTLP integration pages for Laravel and Symfony creates a self-referential link instead of linking to the parent PHP platform documentation.
Severity: LOW

Suggested Fix

The logic in the PlatformLink component needs to be adjusted to correctly handle fallbacks when an explicit guide file exists. It should distinguish between the current page and a true parent/fallback page to prevent generating self-referential links.

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: docs/platforms/php/guides/symfony/integrations/otlp.mdx#L58

Potential issue: The `PlatformLink` component on the Symfony and Laravel OTLP guide
pages generates a self-referential link. Because explicit guide files exist (e.g.,
`docs/platforms/php/guides/symfony/integrations/otlp.mdx`), the component's logic finds
the current page first and sets the link's `href` to the current URL. The
`fallbackPlatform="php"` property is never used. As a result, users clicking the "OTLP
integration docs" link are not navigated to the parent PHP platform documentation but
are instead reloaded on the same page, creating a broken user experience.

Also affects:

  • docs/platforms/php/guides/laravel/integrations/otlp.mdx:59


* 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).

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