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 span.toTraceparent() in favor of spanToTraceHeader() util #10031

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 3, 2024

Instead, there is a new util spanToTraceHeader(span) which can be used. This is done to align the Span schema with OpenTelemetry.

Open question: Do we need to re-export this from all our packages, so users can also use this directly?

@mydea mydea requested review from lforst, Lms24 and AbhiPrasad January 3, 2024 09:33
@mydea mydea self-assigned this Jan 3, 2024
Copy link
Contributor

github-actions bot commented Jan 3, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 76.03 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 67.4 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 61.02 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.97 KB (0%)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 30.42 KB (0%)
@sentry/browser - Webpack (gzipped) 22.12 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 73.42 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 65.11 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 31.27 KB (+0.06% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 23.16 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 204.21 KB (-0.01% 🔽)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 94.1 KB (-0.02% 🔽)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 68.73 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 34.22 KB (-0.02% 🔽)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 67.81 KB (+0.02% 🔺)
@sentry/react - Webpack (gzipped) 22.16 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 84.46 KB (+0.02% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.08 KB (+0.01% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 16.63 KB (0%)

@@ -16,7 +17,7 @@ function traceHeaders(this: Hub): { [key: string]: string } {

return span
? {
'sentry-trace': span.toTraceparent(),
'sentry-trace': spanToTraceHeader(span),
Copy link
Member

Choose a reason for hiding this comment

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

(no action required)
TIL about this function. Not sure why it exists - my guess is downstream SDKs (maybe RN/Electron)...

@mydea mydea force-pushed the fn/spanToTraceparent branch 3 times, most recently from e1d1b87 to f5c228e Compare January 3, 2024 10:50
mydea added 4 commits January 3, 2024 12:59
Instead, there is a new util `spanToTraceHeader(span)` which can be used. This is done to align the Span schema with OpenTelemetry.

Open question: Do we need to re-export this from all our packages?
@mydea mydea force-pushed the fn/spanToTraceparent branch from f5c228e to 4471aa4 Compare January 3, 2024 12:01
@mydea mydea merged commit 38eb964 into develop Jan 3, 2024
95 checks passed
@mydea mydea deleted the fn/spanToTraceparent branch January 3, 2024 12:49
anonrig pushed a commit that referenced this pull request Jan 3, 2024
…Header()` util (#10031)

Instead, there is a new util `spanToTraceHeader(span)` which can be
used. This is done to align the Span schema with OpenTelemetry.

Open question: Do we need to re-export this from all our packages, so
users can also use this directly?
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