-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(core): Respect manually set sentry tracing headers in fetch calls #16183
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
Conversation
size-limit report 📦
|
844a168
to
e044661
Compare
requests.forEach(request => { | ||
const headers = request.headers(); | ||
|
||
// No merged sentry trace headers | ||
expect(headers['sentry-trace']).not.toContain(','); | ||
|
||
// No multiple baggage entries | ||
expect(headers['baggage'].match(/sentry-trace_id/g) ?? []).toHaveLength(1); | ||
expect(headers['baggage'].match(/sentry-release/g) ?? []).toHaveLength(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems harmless but it demonstrates the behaviour change for reused request options:
previously, we'd simple disregard what sentry values were in the request options and always overwrite them. Now:
- we still don't blindly append our values to pre-existing ones
- but instead, we do nothing and just roll with the passed-in headers.
Result: All requests in this test sharing the same request options have the same sentry tracing headers (and hence their child trace trees have the same trace parent)
I think this is fine but it's still worth noting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. I wonder whether there will ever be a problem because some downstream SDK wants to set a prefixed baggage entry in addition to what the core SDK sets, but it will not work because adding a prefixed baggage entry will just stomp on our logic... Might be worth checking with Krystof
Hmm I'm wondering what this downstream SDK would have to do to run into a problem here. This change basically prohibits modifying baggage (or sentry-trace) if the headers already exist on the request. My thinking is that if other higher-level SDKs add entries to the DSC (or baggage), they would do that by using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Double checked with @krystofwoldrich - RN doesn't add request headers to fetch requests. |
…ests (#16184) Analogously to #16183 for `fetch`, this patch ensures that manually set `sentry-trace` and `baggage` headers in XHR requests are respected by our XHR instrumentation and not overwritten. This patch also fixes a bug where we'd append multiple `sentry-trace` or `baggage` values in case the header was somehow set more than once (analogously to #13907 for `fetch`)
 [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=reisene&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->  <h3>Snyk has created this PR to upgrade @sentry/browser from 9.10.0 to 9.17.0.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **9 versions** ahead of your current version. - The recommended version was released **22 days ago**. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@sentry/browser</b></summary> <ul> <li> <b>9.17.0</b> - <a href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.17.0">2025-05-08</a></br><ul> <li>feat(node): Migrate to <code>@ fastify/otel</code> (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/15542" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/15542/hovercard">#15542</a>)</li> </ul> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser</td> <td>23.35 KB</td> </tr> <tr> <td>@ sentry/browser - with treeshaking flags</td> <td>23.19 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing)</td> <td>37.25 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay)</td> <td>74.47 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking flags</td> <td>68.34 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td> <td>79.12 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td> <td>90.93 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Feedback)</td> <td>39.75 KB</td> </tr> <tr> <td>@ sentry/browser (incl. sendFeedback)</td> <td>27.98 KB</td> </tr> <tr> <td>@ sentry/browser (incl. FeedbackAsync)</td> <td>32.74 KB</td> </tr> <tr> <td>@ sentry/react</td> <td>25.16 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing)</td> <td>39.24 KB</td> </tr> <tr> <td>@ sentry/vue</td> <td>27.63 KB</td> </tr> <tr> <td>@ sentry/vue (incl. Tracing)</td> <td>39.01 KB</td> </tr> <tr> <td>@ sentry/svelte</td> <td>23.38 KB</td> </tr> <tr> <td>CDN Bundle</td> <td>24.55 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing)</td> <td>37.29 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay)</td> <td>72.33 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback)</td> <td>77.64 KB</td> </tr> <tr> <td>CDN Bundle - uncompressed</td> <td>71.62 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing) - uncompressed</td> <td>110.34 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td> <td>221.63 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td> <td>234.15 KB</td> </tr> <tr> <td>@ sentry/nextjs (client)</td> <td>40.84 KB</td> </tr> <tr> <td>@ sentry/sveltekit (client)</td> <td>37.73 KB</td> </tr> <tr> <td>@ sentry/node</td> <td>151.37 KB</td> </tr> <tr> <td>@ sentry/node - without tracing</td> <td>95.77 KB</td> </tr> <tr> <td>@ sentry/aws-serverless</td> <td>120.16 KB</td> </tr> </tbody> </table> </li> <li> <b>9.16.1</b> - <a href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.16.1">2025-05-07</a></br><ul> <li>fix(core): Make sure logs get flushed in server-runtime-client (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16222" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16222/hovercard">#16222</a>)</li> <li>ref(node): Remove vercel flushing code that does nothing (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16217" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16217/hovercard">#16217</a>)</li> </ul> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser</td> <td>23.35 KB</td> </tr> <tr> <td>@ sentry/browser - with treeshaking flags</td> <td>23.19 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing)</td> <td>37.25 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay)</td> <td>74.47 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking flags</td> <td>68.34 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td> <td>79.12 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td> <td>90.93 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Feedback)</td> <td>39.75 KB</td> </tr> <tr> <td>@ sentry/browser (incl. sendFeedback)</td> <td>27.98 KB</td> </tr> <tr> <td>@ sentry/browser (incl. FeedbackAsync)</td> <td>32.74 KB</td> </tr> <tr> <td>@ sentry/react</td> <td>25.16 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing)</td> <td>39.24 KB</td> </tr> <tr> <td>@ sentry/vue</td> <td>27.63 KB</td> </tr> <tr> <td>@ sentry/vue (incl. Tracing)</td> <td>39.01 KB</td> </tr> <tr> <td>@ sentry/svelte</td> <td>23.38 KB</td> </tr> <tr> <td>CDN Bundle</td> <td>24.55 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing)</td> <td>37.29 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay)</td> <td>72.33 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback)</td> <td>77.64 KB</td> </tr> <tr> <td>CDN Bundle - uncompressed</td> <td>71.62 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing) - uncompressed</td> <td>110.34 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td> <td>221.63 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td> <td>234.15 KB</td> </tr> <tr> <td>@ sentry/nextjs (client)</td> <td>40.84 KB</td> </tr> <tr> <td>@ sentry/sveltekit (client)</td> <td>37.73 KB</td> </tr> <tr> <td>@ sentry/node</td> <td>143.93 KB</td> </tr> <tr> <td>@ sentry/node - without tracing</td> <td>95.77 KB</td> </tr> <tr> <td>@ sentry/aws-serverless</td> <td>120.16 KB</td> </tr> </tbody> </table> </li> <li> <b>9.16.0</b> - <a href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.16.0">2025-05-07</a></br><h3>Important changes</h3> <ul> <li><strong>feat: Create a Vite plugin that injects sentryConfig into the global config (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16197" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16197/hovercard">#16197</a>)</strong></li> </ul> <p>Add a new plugin <code>makeConfigInjectorPlugin</code> within our existing vite plugin that updates the global vite config with sentry options</p> <ul> <li><strong>feat(browser): Add option to sample linked traces consistently (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16037" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16037/hovercard">#16037</a>)</strong></li> </ul> <p>This PR implements consistent sampling across traces as outlined in (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/15754" data-hovercard-type="issue" data-hovercard-url="/getsentry/sentry-javascript/issues/15754/hovercard">#15754</a>)</p> <ul> <li><strong>feat(cloudflare): Add support for durable objects (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16180" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16180/hovercard">#16180</a>)</strong></li> </ul> <p>This PR introduces a new <code>instrumentDurableObjectWithSentry</code> method to the SDK, which instruments durable objects. We capture both traces and errors automatically.</p> <ul> <li><strong>feat(node): Add Prisma integration by default (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16073" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16073/hovercard">#16073</a>)</strong></li> </ul> <p><a href="https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/prisma/" rel="nofollow">Prisma integration</a> is enabled by default, it should work for both ESM and CJS.</p> <ul> <li><strong>feat(react-router): Add client-side router instrumentation (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16185" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16185/hovercard">#16185</a>)</strong></li> </ul> <p>Adds client-side instrumentation for react router's <code>HydratedRouter</code>. To enable it, simply replace <code>browserTracingIntegration()</code> with <code>reactRouterTracingIntegration()</code> in your client-side init call.</p> <ul> <li><strong>fix(node): Avoid double-wrapping http module (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16177" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16177/hovercard">#16177</a>)</strong></li> </ul> <p>When running your application in ESM mode, there have been scenarios that resulted in the <code>http</code>/<code>https</code> emitting duplicate spans for incoming requests. This was apparently caused by us double-wrapping the modules for incoming request isolation.</p> <p>In order to solve this problem, the modules are no longer monkey patched by us for request isolation. Instead, we register diagnostics<em>channel hooks to handle request isolation now.<br> While this is generally not expected to break anything, there is one tiny change that _may</em> affect you if you have been relying on very specific functionality:</p> <p>The <code>ignoreOutgoingRequests</code> option of <code>httpIntegration</code> receives the <code>RequestOptions</code> as second argument. This type is not changed, however due to how the wrapping now works, we no longer pass through the full RequestOptions, but re-construct this partially based on the generated request. For the vast majority of cases, this should be fine, but for the sake of completeness, these are the only fields that may be available there going forward - other fields that <em>may</em> have existed before may no longer be set:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ignoreOutgoingRequests(url: string, { method: string; protocol: string; host: string; hostname: string; // same as host path: string; headers: OutgoingHttpHeaders; })"><pre><span class="pl-s1">ignoreOutgoingRequests</span><span class="pl-kos">(</span><span class="pl-s1">url</span>: <span class="pl-s1">string</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">method</span>: <span class="pl-s1">string</span><span class="pl-kos">;</span> protocol: <span class="pl-s1">string</span><span class="pl-kos">;</span> host: <span class="pl-s1">string</span><span class="pl-kos">;</span> hostname: <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-c">// same as host</span> path: <span class="pl-s1">string</span><span class="pl-kos">;</span> headers: <span class="pl-v">OutgoingHttpHeaders</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <h3>Other changes</h3> <ul> <li>feat(cloudflare): Add logs exports (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16165" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16165/hovercard">#16165</a>)</li> <li>feat(vercel-edge): Add logs export (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16166" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16166/hovercard">#16166</a>)</li> <li>feat(cloudflare): Read <code>SENTRY_RELEASE</code> from <code>env</code> (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16201" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16201/hovercard">#16201</a>)</li> <li>feat(node): Drop <code>http.server</code> spans with 404 status by default (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16205" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16205/hovercard">#16205</a>)</li> <li>fix(browser): Respect manually set sentry tracing headers in XHR requests (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16184" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16184/hovercard">#16184</a>)</li> <li>fix(core): Respect manually set sentry tracing headers in fetch calls (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16183" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16183/hovercard">#16183</a>)</li> <li>fix(feedback): Prevent <code>removeFromDom()</code> from throwing (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16030" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16030/hovercard">#16030</a>)</li> <li>fix(node): Use class constructor in docstring for winston transport (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16167" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16167/hovercard">#16167</a>)</li> <li>fix(node): Fix vercel flushing logic & add test for it (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16208" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16208/hovercard">#16208</a>)</li> <li>fix(node): Fix 404 route handling in express 5 (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16211" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16211/hovercard">#16211</a>)</li> <li>fix(logs): Ensure logs can be flushed correctly (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16216" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16216/hovercard">#16216</a>)</li> <li>ref(core): Switch to standardized log envelope (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16133" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16133/hovercard">#16133</a>)</li> </ul> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser</td> <td>23.35 KB</td> </tr> <tr> <td>@ sentry/browser - with treeshaking flags</td> <td>23.19 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing)</td> <td>37.25 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay)</td> <td>74.47 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking flags</td> <td>68.34 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td> <td>79.12 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td> <td>90.93 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Feedback)</td> <td>39.75 KB</td> </tr> <tr> <td>@ sentry/browser (incl. sendFeedback)</td> <td>27.98 KB</td> </tr> <tr> <td>@ sentry/browser (incl. FeedbackAsync)</td> <td>32.74 KB</td> </tr> <tr> <td>@ sentry/react</td> <td>25.16 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing)</td> <td>39.24 KB</td> </tr> <tr> <td>@ sentry/vue</td> <td>27.63 KB</td> </tr> <tr> <td>@ sentry/vue (incl. Tracing)</td> <td>39.01 KB</td> </tr> <tr> <td>@ sentry/svelte</td> <td>23.38 KB</td> </tr> <tr> <td>CDN Bundle</td> <td>24.55 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing)</td> <td>37.29 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay)</td> <td>72.33 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback)</td> <td>77.64 KB</td> </tr> <tr> <td>CDN Bundle - uncompressed</td> <td>71.62 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing) - uncompressed</td> <td>110.34 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td> <td>221.63 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td> <td>234.15 KB</td> </tr> <tr> <td>@ sentry/nextjs (client)</td> <td>40.84 KB</td> </tr> <tr> <td>@ sentry/sveltekit (client)</td> <td>37.73 KB</td> </tr> <tr> <td>@ sentry/node</td> <td>144.43 KB</td> </tr> <tr> <td>@ sentry/node - without tracing</td> <td>96.3 KB</td> </tr> <tr> <td>@ sentry/aws-serverless</td> <td>120.66 KB</td> </tr> </tbody> </table> </li> <li> <b>9.15.0</b> - <a href="https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.15.0">2025-04-29</a></br><h3>Important Changes</h3> <ul> <li><strong>feat: Export <code>wrapMcpServerWithSentry</code> from server packages (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16127" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16127/hovercard">#16127</a>)</strong></li> </ul> <p>Exports the wrapMcpServerWithSentry which is our MCP server instrumentation from all the server packages.</p> <ul> <li><strong>feat(core): Associate resource/tool/prompt invocations with request span instead of response span (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16126" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16126/hovercard">#16126</a>)</strong></li> </ul> <p>Adds a best effort mechanism to associate handler spans for <code>resource</code>, <code>tool</code> and <code>prompt</code> with the incoming message requests instead of the outgoing SSE response.</p> <h3>Other Changes</h3> <ul> <li>fix: Vercel <code>ai</code> ESM patching (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16152" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16152/hovercard">#16152</a>)</li> <li>fix(node): Update version range for <code>module.register</code> (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16125" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16125/hovercard">#16125</a>)</li> <li>fix(react-router): Spread <code>unstable_sentryVitePluginOptions</code> correctly (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16156" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16156/hovercard">#16156</a>)</li> <li>fix(react): Fix Redux integration failing with reducer injection (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16106" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16106/hovercard">#16106</a>)</li> <li>fix(remix): Add ESM-compatible exports (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16124" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16124/hovercard">#16124</a>)</li> <li>fix(remix): Avoid rewrapping root loader. (<a href="https://redirect.github.com/getsentry/sentry-javascript/pull/16136" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/16136/hovercard">#16136</a>)</li> </ul> <p>Work in this release was contributed by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AntoineDuComptoirDesPharmacies/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/AntoineDuComptoirDesPharmacies">@ AntoineDuComptoirDesPharmacies</a>. Thank you for your contribution!</p> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser</td> <td>23.28 KB</td> </tr> <tr> <td>@ sentry/browser - with treeshaking flags</td> <td>23.1 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing)</td> <td>36.93 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay)</td> <td>74.1 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - with treeshaking flags</td> <td>67.47 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay with Canvas)</td> <td>78.76 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay, Feedback)</td> <td>90.58 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Feedback)</td> <td>39.68 KB</td> </tr> <tr> <td>@ sentry/browser (incl. sendFeedback)</td> <td>27.9 KB</td> </tr> <tr> <td>@ sentry/browser (incl. FeedbackAsync)</td> <td>32.67 KB</td> </tr> <tr> <td>@ sentry/react</td> <td>25.09 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing)</td> <td>38.93 KB</td> </tr> <tr> <td>@ sentry/vue</td> <td>27.5 KB</td> </tr> <tr> <td>@ sentry/vue (incl. Tracing)</td> <td>38.69 KB</td> </tr> <tr> <td>@ sentry/svelte</td> <td>23.31 KB</td> </tr> <tr> <td>CDN Bundle</td> <td>24.49 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing)</td> <td>36.96 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay)</td> <td>72 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback)</td> <td>77.3 KB</td> </tr> <tr> <td>CDN Bundle - uncompressed</td> <td>71.5 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing) - uncompressed</td> <td>109.33 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td> <td>220.62 KB</td> </tr> <tr> <td>CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed</td> <td>233.15 KB</td> </tr> <tr> <td>@ sentry/nextjs (client)</td> <td>40.51 KB</td> </tr> <tr> <td>@ sentry/sveltekit (client)</td> <td>37.41 KB</td> </tr> <tr> <td>@ sentry/node</td> <td>143.4 KB</td> </tr> <tr> <td>@ sentry/node - without tracing</td> <td>96.49 KB</td> </tr> <tr> <td>@ sentry/aws-serverless</td> <td>120.81 KB</td> </tr> </tbody> </table> </li> <li> <b>9.14.0</b> - 2025-04-23 </li> <li> <b>9.13.0</b> - 2025-04-16 </li> <li> <b>9.12.0</b> - 2025-04-08 </li> <li> <b>9.11.0</b> - 2025-04-03 </li> <li> <b>9.10.1</b> - 2025-03-28 </li> <li> <b>9.10.0</b> - 2025-03-27 </li> </ul> from <a href="https://redirect.github.com/getsentry/sentry-javascript/releases">@sentry/browser GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJiMWMyNmNmNi03NzYxLTRkZDctYjM1Ni1jMWVmNGNhY2FiZmEiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImIxYzI2Y2Y2LTc3NjEtNGRkNy1iMzU2LWMxZWY0Y2FjYWJmYSJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83/settings/integration?pkg=@sentry/browser&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@sentry/browser","from":"9.10.0","to":"9.17.0"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"b1c26cf6-7761-4dd7-b356-c1ef4cacabfa","prPublicId":"b1c26cf6-7761-4dd7-b356-c1ef4cacabfa","packageManager":"npm","priorityScoreList":[],"projectPublicId":"3b48baaa-833b-4239-b348-16091472ee83","projectUrl":"https://app.snyk.io/org/reisene/project/3b48baaa-833b-4239-b348-16091472ee83?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":9,"publishedDate":"2025-05-08T12:44:52.593Z"},"vulns":[]}' ## Podsumowanie od Sourcery Prace porządkowe: - Aktualizacja @sentry/browser z wersji 9.10.0 do 9.17.0 w zależnościach i pliku blokady (lockfile) <details> <summary>Original summary in English</summary> ## Summary by Sourcery Chores: - Bump @sentry/browser from 9.10.0 to 9.17.0 in dependencies and lockfile </details> Co-authored-by: Snyk bot <[email protected]>
This PR fixes a bit of a weird fetch instrumentation problem:
If users manually pass in
sentry-trace
andbaggage
headers, we previously overwrote the values with the ones we computed. While in #13907 we specifically decided that we want to remove any previously set sentry tracing header values and replace them with the current ones, I think the main motivation was to avoid duplicated header values.With this PR, we:
nice side-effect: slight bundle size reduction :D
came up in https://linear.app/getsentry/issue/FE-380/debug-trace-context-propagation-issue-from-tanstack-to-go-backend