Skip to content

fix(opentelemetry)!: Skip propagation without URL - #6419

Draft
adinauer wants to merge 3 commits into
9.x.xfrom
fix/otel-propagation-require-url
Draft

adinauer wants to merge 3 commits into
9.x.xfrom
fix/otel-propagation-require-url

Conversation

@adinauer

@adinauer adinauer commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

📜 Description

Stop the Sentry OpenTelemetry propagators from injecting sentry-trace and baggage when an outgoing span does not provide a URL. URL-bearing spans continue to be checked against tracePropagationTargets.

Messaging producer spans remain eligible for propagation without a URL because OpenTelemetry queue and messaging instrumentations use SpanKind.PRODUCER and inject trace context into message metadata.

Document the propagation behavior for both the standard and OTLP OpenTelemetry integrations.

💡 Motivation and Context

Previously, a missing URL bypassed tracePropagationTargets and caused tracing headers to be attached to an unknown outgoing carrier. This changes that behavior for 9.x while preserving distributed tracing for queue producers, which legitimately do not have URL attributes.

💚 How did you test it?

  • ./gradlew ':sentry-opentelemetry:sentry-opentelemetry-core:test' ':sentry-opentelemetry:sentry-opentelemetry-otlp:test'
  • ./gradlew spotlessApply apiDump

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Stop injecting sentry-trace and baggage for URL-less outgoing spans so
tracePropagationTargets can be enforced consistently. Preserve propagation
for producer spans because messaging carriers do not have a URL.

BREAKING CHANGE: URL-less non-producer spans no longer receive Sentry
tracing headers.

Fixes #5725
Co-Authored-By: Claude <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

JAVA-632

@sentry

sentry Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

Use server.address and optional server.port as propagation targets for
URL-less client spans. Preserve gRPC and other destination-aware client
propagation while keeping unknown carriers fail-closed.

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

This branch has not been deployed

No deployments
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.

1 participant