Skip to content

ref: Remove old OTel support code - #6935

Merged
sentrivana merged 9 commits into
major/3.0from
ivana/major/remove-old-otel-integration
Jul 29, 2026
Merged

ref: Remove old OTel support code#6935
sentrivana merged 9 commits into
major/3.0from
ivana/major/remove-old-otel-integration

Conversation

@sentrivana

@sentrivana sentrivana commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
  • Remove everything in integrations/opentelemetry (SentrySpanProcessor, SentryPropagator, etc.)
  • Remove associated test files and CI config
  • Move old propagator functions and consts that we were using in OTLPIntegration to the OTLP propagator directly
  • Remove instrumenter

Note: NoOpSpan was not removed because it makes mypy blow up. Not worth the effort as we'll anyway get rid of it when dropping transaction based tracing.

Issues

Closes #6932

Reminders

@sentrivana
sentrivana marked this pull request as ready for review July 29, 2026 14:28
@sentrivana
sentrivana requested a review from a team as a code owner July 29, 2026 14:29
Comment thread scripts/populate_tox/tox.jinja
Comment thread sentry_sdk/integrations/otlp.py
Comment thread sentry_sdk/integrations/otlp.py
@sentrivana
sentrivana merged commit 4702caa into major/3.0 Jul 29, 2026
9 of 10 checks passed
@sentrivana
sentrivana deleted the ivana/major/remove-old-otel-integration branch July 29, 2026 14:43

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d277130. Configure here.



SENTRY_BAGGAGE_KEY = create_key("sentry-baggage")
SENTRY_TRACE_KEY = create_key("sentry-trace")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused SENTRY_TRACE_KEY after move

Low Severity

SENTRY_TRACE_KEY is defined and written in extract, but nothing in the codebase reads it anymore. The old SentrySpanProcessor was the only consumer of that context value (parent_sampled), so after removing that processor this is a dead store left over from the move.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d277130. Configure here.

Comment thread tox.ini
# OpenTelemetry with OTLP
otlp: opentelemetry-distro[otlp]
otlp: responses
otlp: pytest-forked

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orphaned pytest-forked in tox

Low Severity

pytest-forked was moved onto the otlp tox env in tox.ini, but otlp tests do not use @pytest.mark.forked, and the same dependency was not added to tox.jinja. That leaves an unused CI dependency and drifts the generated file from its template source.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d277130. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

96436 passed | ⏭️ 6371 skipped | Total: 102807 | Pass Rate: 93.8% | Execution Time: 350m 15s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -3157
Passed Tests 📉 -2747
Failed Tests
Skipped Tests 📉 -410

All tests are passing successfully.

✅ Patch coverage is 87.88%. Project has 2451 uncovered lines.
❌ Project coverage is 89.59%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/otlp.py 86.21% ⚠️ 4 Missing and 4 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.86%    89.59%    -0.27%
==========================================
  Files          193       186        -7
  Lines        24645     23553     -1092
  Branches      8780      8366      -414
==========================================
+ Hits         22147     21102     -1045
- Misses        2498      2451       -47
- Partials      1400      1346       -54

Generated by Codecov Action

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.

2 participants