Skip to content

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

Merged
merged 4 commits into from
May 5, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented May 2, 2025

This PR fixes a bit of a weird fetch instrumentation problem:

If users manually pass in sentry-trace and baggage 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:

  • still check for pre-existing sentry headers, but do nothing if we find them
  • still ensure that we merge pre-existing non-sentry baggage values with our baggage values
  • add a bunch of unit tests for the various header and request types (I feel like I wrote these before but couldn't find em)
  • add an integration test to demonstrate that manually passed in headers are still taken

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

@Lms24 Lms24 changed the title fix(core): Handle manually set in sentry tracing headers in fetch calls fix(core): Respect manually set in sentry tracing headers in fetch calls May 2, 2025
@Lms24 Lms24 self-assigned this May 2, 2025
@Lms24 Lms24 requested a review from lforst May 2, 2025 12:28
Copy link
Contributor

github-actions bot commented May 2, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.32 KB - -
@sentry/browser - with treeshaking flags 23.13 KB - -
@sentry/browser (incl. Tracing) 36.96 KB -0.08% -28 B 🔽
@sentry/browser (incl. Tracing, Replay) 74.14 KB -0.02% -9 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.48 KB -0.02% -13 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 78.79 KB -0.01% -7 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 90.59 KB -0.01% -7 B 🔽
@sentry/browser (incl. Feedback) 39.71 KB - -
@sentry/browser (incl. sendFeedback) 27.94 KB - -
@sentry/browser (incl. FeedbackAsync) 32.7 KB - -
@sentry/react 25.12 KB - -
@sentry/react (incl. Tracing) 38.94 KB -0.05% -17 B 🔽
@sentry/vue 27.55 KB - -
@sentry/vue (incl. Tracing) 38.71 KB -0.05% -18 B 🔽
@sentry/svelte 23.34 KB - -
CDN Bundle 24.52 KB - -
CDN Bundle (incl. Tracing) 36.98 KB -0.03% -11 B 🔽
CDN Bundle (incl. Tracing, Replay) 72.02 KB -0.02% -11 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 77.33 KB -0.03% -19 B 🔽
CDN Bundle - uncompressed 71.57 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.34 KB -0.06% -66 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.63 KB -0.03% -66 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.15 KB -0.03% -66 B 🔽
@sentry/nextjs (client) 40.55 KB -0.02% -8 B 🔽
@sentry/sveltekit (client) 37.43 KB -0.04% -15 B 🔽
@sentry/node 143.45 KB -0.01% -1 B 🔽
@sentry/node - without tracing 96.53 KB -0.01% -1 B 🔽
@sentry/aws-serverless 120.86 KB - -

View base workflow run

@Lms24 Lms24 requested review from mydea and chargome May 2, 2025 12:44
@Lms24 Lms24 changed the title fix(core): Respect manually set in sentry tracing headers in fetch calls fix(core): Respect manually set sentry tracing headers in fetch calls May 2, 2025
@Lms24 Lms24 force-pushed the lms/fix-core-fetch-custom-trace-headers branch from 844a168 to e044661 Compare May 2, 2025 12:59
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);
Copy link
Member Author

@Lms24 Lms24 May 2, 2025

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.

Copy link
Contributor

@lforst lforst left a 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

@Lms24
Copy link
Member Author

Lms24 commented May 5, 2025

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 Scope.setPropagationContext({dsc: ...}) instead of manually adding headers to baggage 🤔
But it's a good catch. Let me check with Mobile folks

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Looks good!

@Lms24
Copy link
Member Author

Lms24 commented May 5, 2025

Double checked with @krystofwoldrich - RN doesn't add request headers to fetch requests.

@Lms24 Lms24 enabled auto-merge (squash) May 5, 2025 12:05
@Lms24 Lms24 merged commit 69224b8 into develop May 5, 2025
154 checks passed
@Lms24 Lms24 deleted the lms/fix-core-fetch-custom-trace-headers branch May 5, 2025 12:16
Lms24 added a commit that referenced this pull request May 5, 2025
…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`)
aviator-app bot added a commit to reisene/HulajDusza-serwis that referenced this pull request May 30, 2025
![reisene](https://badgen.net/badge/icon/reisene/green?label=) [<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 -->

![snyk-top-banner](https://res.cloudinary.com/snyk/image/upload/r-d/scm-platform/snyk-pull-requests/pr-banner-default.svg)


<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 &amp; 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&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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&#x3D;@sentry/browser&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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]>
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.

3 participants