Skip to content
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

feat(core): Deprecate spanId on propagationContext #14482

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 26, 2024

This PR deprecates setting & reading the spanId on the propagation context, as well as generatePropagationContext().

Instead, you can/should now omit the spanId: scope.setPropagationContext({ traceId: generateTraceId() }), which will under the hood generate a new random span ID for the time being.

This PR does not change any behavior about using the spanId, but adds comments for where we want to replace this in v9 - there, we'll just generate new span IDs on the fly in these cases instead of using the one from propagation context. The propagation context will only hold traceId & parentSpanId (optionally).

Closes #14255

@mydea mydea requested review from lforst and Lms24 November 26, 2024 12:54
@mydea mydea self-assigned this Nov 26, 2024
Copy link
Contributor

github-actions bot commented Nov 26, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.13 KB +0.13% +30 B 🔺
@sentry/browser - with treeshaking flags 21.84 KB +0.13% +29 B 🔺
@sentry/browser (incl. Tracing) 35.7 KB +0.07% +23 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.58 KB +0.02% +14 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.99 KB +0.03% +19 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.91 KB +0.02% +13 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 89.37 KB +0.03% +21 B 🔺
@sentry/browser (incl. Feedback) 39.85 KB +0.05% +19 B 🔺
@sentry/browser (incl. sendFeedback) 27.73 KB +0.02% +5 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.52 KB +0.06% +18 B 🔺
@sentry/react 25.8 KB +0.1% +25 B 🔺
@sentry/react (incl. Tracing) 38.53 KB +0.08% +28 B 🔺
@sentry/vue 27.3 KB +0.11% +29 B 🔺
@sentry/vue (incl. Tracing) 37.49 KB +0.01% +2 B 🔺
@sentry/svelte 23.27 KB +0.06% +14 B 🔺
CDN Bundle 24.32 KB +0.18% +43 B 🔺
CDN Bundle (incl. Tracing) 37.34 KB +0.12% +43 B 🔺
CDN Bundle (incl. Tracing, Replay) 72.22 KB +0.04% +29 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 77.56 KB +0.05% +32 B 🔺
CDN Bundle - uncompressed 71.43 KB +0.12% +82 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 110.78 KB +0.1% +112 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 223.85 KB +0.05% +112 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 237.06 KB +0.05% +112 B 🔺
@sentry/nextjs (client) 38.85 KB +0.07% +25 B 🔺
@sentry/sveltekit (client) 36.21 KB +0.08% +27 B 🔺
@sentry/node 134.81 KB +0.02% +25 B 🔺
@sentry/node - without tracing 96.64 KB +0.03% +28 B 🔺
@sentry/aws-serverless 106.85 KB +0.02% +20 B 🔺

View base workflow run

@mydea mydea force-pushed the fn/propagationContextDeprecateSpanId branch from 8210c7a to 7965df1 Compare November 26, 2024 14:46
@mydea mydea merged commit 17396a1 into develop Nov 27, 2024
152 checks passed
@mydea mydea deleted the fn/propagationContextDeprecateSpanId branch November 27, 2024 11:30
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.

Deprecate spanId on PropagationContext
2 participants