Skip to content

fix(opentelemetry): Ensure DSC propagation works correctly #10904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Mar 4, 2024

This updates the propagation handling in OTEL to the following:

  1. If there is an active (local) span, we always pick up propagation context/DSC data from it.
  2. Else, we try to pick it from the current scope
  3. If we can't find this (e.g. a detached otel context is used), we try to pick it from the remote span context
  4. Finally, if that also fails, we have no DSC

Closes #10899

This updates the propagation handling in OTEL to the following:
1. If there is an active (local) span, we always pick up propagation context/DSC data from it.
2. Else, we try to pick it from the current scope
3. If we can't find this (e.g. a detached otel context is used), we try to pick it from the remote span context
4. Finally, if that also fails, we have no DSC
@mydea mydea requested review from lforst, AbhiPrasad and s1gr1d March 4, 2024 14:17
@mydea mydea self-assigned this Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.21 KB (-0.25% 🔽)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.46 KB (-0.22% 🔽)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.4 KB (-0.21% 🔽)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.01 KB (-0.26% 🔽)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.67 KB (-0.53% 🔽)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 32.67 KB (-0.53% 🔽)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.02 KB (-0.15% 🔽)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.02 KB (-0.13% 🔽)
@sentry/browser - Webpack (gzipped) 22.27 KB (-0.12% 🔽)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 75.37 KB (-0.61% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 67.03 KB (-0.63% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.87 KB (-1.26% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.55 KB (-0.97% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 210.31 KB (-0.37% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 99.04 KB (-0.77% 🔽)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 73.45 KB (-0.84% 🔽)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.95 KB (-1.12% 🔽)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.74 KB (-0.2% 🔽)
@sentry/react - Webpack (gzipped) 22.3 KB (-0.11% 🔽)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.19 KB (-0.21% 🔽)
@sentry/nextjs Client - Webpack (gzipped) 49.53 KB (-0.33% 🔽)
@sentry-internal/feedback - Webpack (gzipped) 17.09 KB (0%)

Copy link
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

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

Lgtm!

@mydea mydea merged commit 09f2a69 into develop Mar 4, 2024
@mydea mydea deleted the fn/otel-propagation branch March 4, 2024 15:33
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.

[v8] Fix DSC/propagation context when used with opentelemetry
2 participants