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(core): .set the sentry-trace header instead of .appending in fetch instrumentation #13907

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

lforst
Copy link
Member

@lforst lforst commented Oct 8, 2024

Fixes #13870
Fixes #12350

Fixes issues where persistence of the options object passed to fetch() would cause the options object, or rather the attached sentry-trace and baggage headers to indefinitely grow in size.

Copy link
Contributor

github-actions bot commented Oct 8, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.73 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.08 KB +0.31% +110 B 🔺
@sentry/browser (incl. Tracing, Replay) 71.65 KB +0.16% +114 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.06 KB +0.2% +122 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 75.99 KB +0.17% +125 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.76 KB +0.15% +129 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.6 KB +0.11% +101 B 🔺
@sentry/browser (incl. metrics) 27 KB - -
@sentry/browser (incl. Feedback) 39.87 KB - -
@sentry/browser (incl. sendFeedback) 27.38 KB - -
@sentry/browser (incl. FeedbackAsync) 32.17 KB - -
@sentry/react 25.49 KB - -
@sentry/react (incl. Tracing) 38.05 KB +0.28% +108 B 🔺
@sentry/vue 26.9 KB - -
@sentry/vue (incl. Tracing) 36.97 KB +0.29% +106 B 🔺
@sentry/svelte 22.87 KB - -
CDN Bundle 24.05 KB - -
CDN Bundle (incl. Tracing) 36.86 KB +0.29% +106 B 🔺
CDN Bundle (incl. Tracing, Replay) 71.41 KB +0.17% +120 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 76.71 KB +0.15% +112 B 🔺
CDN Bundle - uncompressed 70.53 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.39 KB +0.33% +358 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 221.47 KB +0.16% +358 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 234.69 KB +0.15% +358 B 🔺
@sentry/nextjs (client) 38.02 KB +0.29% +109 B 🔺
@sentry/sveltekit (client) 35.69 KB +0.36% +130 B 🔺
@sentry/node 124.5 KB - -
@sentry/node - without tracing 93.64 KB - -
@sentry/aws-serverless 103.29 KB -0.01% -2 B 🔽

View base workflow run

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

I'm still curious how we'd attach headers multiple times but I think the change is fine.
I guess as long as we don't find out why this happene(d) testing against would be a bit artificial

@lforst
Copy link
Member Author

lforst commented Oct 8, 2024

I'm still curious how we'd attach headers multiple times but I think the change is fine.
I guess as long as we don't find out why this happene(d) testing against would be a bit artificial

I think I know a way this can happen. Basically, if you re-use request objects. I'll try to come up with tests.

Copy link

codecov bot commented Oct 8, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
633 1 632 24
View the top 1 failed tests by shortest run time
middleware.test.ts Records exceptions happening in middleware
Stack Traces | 120s run time
middleware.test.ts:41:5 Records exceptions happening in middleware

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants