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

fix(node): Ensure httpIntegration propagates traces #15233

Merged
merged 5 commits into from
Jan 31, 2025
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 30, 2025

Related to #15231, I noticed that we today would not propagate traces in outgoing http requests if:

  1. The user configures httpIntegration({ spans: false })
  2. ...or the user has a custom OTEL setup
  3. and the user does not add their own HttpInstrumentation

Admittedly and edge case. More importantly, though, by actually adding distributed tracing information here, we are unblocked from potentially stopping to ship the http-instrumentation to users that do not need spans (and/or have a custom otel setup).

@mydea mydea requested review from lforst and Lms24 January 30, 2025 13:10
@mydea mydea self-assigned this Jan 30, 2025
Copy link
Contributor

github-actions bot commented Jan 30, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.03 KB - -
@sentry/browser - with treeshaking flags 22.92 KB - -
@sentry/browser (incl. Tracing) 35.8 KB - -
@sentry/browser (incl. Tracing, Replay) 72.59 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 66.13 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.85 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.35 KB - -
@sentry/browser (incl. Feedback) 39.71 KB - -
@sentry/browser (incl. sendFeedback) 27.66 KB - -
@sentry/browser (incl. FeedbackAsync) 32.44 KB - -
@sentry/react 24.84 KB - -
@sentry/react (incl. Tracing) 37.69 KB - -
@sentry/vue 27.14 KB - -
@sentry/vue (incl. Tracing) 37.52 KB - -
@sentry/svelte 23.15 KB - -
CDN Bundle 24.23 KB - -
CDN Bundle (incl. Tracing) 35.91 KB - -
CDN Bundle (incl. Tracing, Replay) 70.56 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 75.69 KB - -
CDN Bundle - uncompressed 70.83 KB - -
CDN Bundle (incl. Tracing) - uncompressed 106.57 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 217.42 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.99 KB - -
@sentry/nextjs (client) 38.65 KB - -
@sentry/sveltekit (client) 36.3 KB - -
@sentry/node 156.52 KB +0.1% +160 B 🔺
@sentry/node - without tracing 97.64 KB +0.2% +195 B 🔺
@sentry/aws-serverless 107.08 KB +0.16% +170 B 🔺

View base workflow run

// If the core UndiciInstrumentation is registered, it will already have set the headers
// We do not want to add any then
if (!headers[k]) {
headers[k] = v;
Copy link
Member

Choose a reason for hiding this comment

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

m: This works for sentry-trace but since baggage is standardized, other libraries or users might add their own entries. Which means we need to check for sentry- values in existing headers.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated it to merge baggages together!

@mydea mydea force-pushed the fn/node-http-inject branch from dff0b91 to 81090de Compare January 31, 2025 09:36
@mydea mydea merged commit 3e31bdc into develop Jan 31, 2025
143 checks passed
@mydea mydea deleted the fn/node-http-inject branch January 31, 2025 10:06
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