Skip to content

feat(otel): mark span processor based OpenTelemetry setup methods as obsolete - #5586

Open
jamescrosswell wants to merge 7 commits into
mainfrom
obsolete-potel-init
Open

jamescrosswell wants to merge 7 commits into
mainfrom
obsolete-potel-init

Conversation

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Marks the span-processor based ("POTEL") OpenTelemetry setup methods in Sentry.OpenTelemetry as [Obsolete], ahead of removing them in 7.0.0:

  • TracerProviderBuilder.AddSentry(...) → use AddSentryOtlpExporter(dsn)
  • SentryOptions.UseOpenTelemetry(...) (both overloads) → use UseOtlp()

The replacements live in the Sentry.OpenTelemetry.Exporter package, added in #4899. Obsolete warnings name that package so users know where to find the new methods.

The GraphQL.Server and AspNetCore.Blazor.Server samples still used the old methods, so they now use OTLP. The OpenTelemetry sample READMEs had outdated snippets too, and those are fixed.

Closes #4932

🤖 Generated with Claude Code

…lete

AddSentry and UseOpenTelemetry will be removed in 7.0.0 in favour of
AddSentryOtlpExporter/UseOtlp from Sentry.OpenTelemetry.Exporter. Samples
still using them are migrated to OTLP.

Closes #4932

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread src/Sentry.OpenTelemetry/SentryOptionsExtensions.cs Outdated
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.84%. Comparing base (cba98c9) to head (ff32874).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5586      +/-   ##
==========================================
+ Coverage   74.76%   74.84%   +0.08%     
==========================================
  Files         515      515              
  Lines       18963    18963              
  Branches     3694     3694              
==========================================
+ Hits        14177    14193      +16     
+ Misses       3908     3892      -16     
  Partials      878      878              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell
jamescrosswell marked this pull request as ready for review September 17, 2026 03:10
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Sep 17, 2026
Comment thread src/Sentry.OpenTelemetry/SentryOptionsExtensions.cs
Comment thread src/Sentry.OpenTelemetry/TracerProviderBuilderExtensions.cs Outdated
Comment thread samples/Sentry.Samples.OpenTelemetry.Console/README.md Outdated
Comment thread samples/Sentry.Samples.OpenTelemetry.AspNetCore/README.md Outdated
Comment thread samples/Sentry.Samples.OpenTelemetry.Console/README.md Outdated
Comment thread src/Sentry.OpenTelemetry/SentryOptionsExtensions.cs Outdated
Comment thread src/Sentry.OpenTelemetry/TracerProviderBuilderExtensions.cs Outdated
jamescrosswell and others added 5 commits September 21, 2026 10:06
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark POTEL init overloads as obsolete prior to phasing these out

2 participants