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(replay): Throttle breadcrumbs to max 300/5s #8086

Merged
merged 9 commits into from May 26, 2023
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented May 9, 2023

This updates custom breadcrumb handling to be throttled to max. 300 breadcrumbs/5s.

If we exceed this amount of breadcrumbs, we drop any further breadcrumbs and instead add a single breadcrumb with category: 'replay.throttled', which the UI can use to indicate that something was dropped.

Closes #8072

@mydea mydea requested review from billyvg and ryan953 May 9, 2023 15:11
@mydea mydea self-assigned this May 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.05 KB (+0.14% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 65.69 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.59 KB (+0.13% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 58.16 KB (+0.14% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.21 KB (+0.18% 🔺)
@sentry/browser - Webpack (minified) 69.08 KB (+0.06% 🔺)
@sentry/react - Webpack (gzipped + minified) 21.23 KB (+0.19% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.16 KB (+0.1% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.67 KB (+0.11% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.91 KB (+0.11% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 48.49 KB (+1.84% 🔺)
@sentry/replay - Webpack (gzipped + minified) 42.17 KB (+1.71% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 67.48 KB (+1.46% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.37 KB (+1.66% 🔺)

@mydea mydea force-pushed the fn/many-network branch 3 times, most recently from 194c9c9 to e61da64 Compare May 10, 2023 12:17
return route.fulfill({
status: 200,
contentType: 'text/javascript',
body: `const aha = ${'xx'.repeat(20_000)};`,
Copy link
Member

Choose a reason for hiding this comment

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

does this need to be valid js? i think it needs some extra quotes around the string

Suggested change
body: `const aha = ${'xx'.repeat(20_000)};`,
body: `const aha = '${'xx'.repeat(20_000)}';`,

Copy link
Member

Choose a reason for hiding this comment

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

@ryan953 Francesco's out for the next two weeks. Do you want to take over this (only if you have availability)?

@cmanallen
Copy link
Member

Related: getsentry/sentry#48259

maxCount: number,
durationSeconds: number,
): (...rest: Parameters<T>) => ReturnType<T> | typeof THROTTLED | typeof SKIPPED {
const counter = new Map<number, number>();
Copy link
Member

Choose a reason for hiding this comment

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

l:
So... regarding that hit counter xD

At first I was thinking, we should change this to a ring buffer because this would allow us to have a constant size memory object instead of the map that could grow. But then I noticed that we always clean up and never add or count separately. So unless I'm missing something, this map would not grow infinitely and hence the ring buffer isn't strictly necessary. It's probably still a little cleaner because the map is a dynamically allocating data structure vs a fixed-size one but I'll leave this up to you/Billy to decide (also we can revisit ofc).

Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine for now -- we can always revisit this in the future

const COUNT = 250;
const THROTTLE_LIMIT = 300;

sentryTest(
Copy link
Member

Choose a reason for hiding this comment

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

RE the flakiness we discussed in the call yesterday: iiuc, we're throttling all kinds of breadcrumbs, right? So to decrease/get rid of the flakiness, should we perhaps only create and check for click breadcrumbs? Maybe these are more reliably created than the network breadcrumbs.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, would clicks end up getting throttled by the core sdk first?

Copy link
Member

Choose a reason for hiding this comment

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

Huh I thought we didn't but it turns out we do, good catch!

/**
* Wraps addEventListener to capture UI breadcrumbs
* @param handler function that will be triggered
* @param globalListener indicates whether event was captured by the global event listener
* @returns wrapped breadcrumb events handler
* @hidden
*/
function makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {
return (event: Event): void => {
// It's possible this handler might trigger multiple times for the same
// event (e.g. event propagation through node ancestors).
// Ignore if we've already captured that event.
if (!event || lastCapturedEvent === event) {
return;
}
// We always want to skip _some_ events.
if (shouldSkipDOMEvent(event)) {
return;
}
const name = event.type === 'keypress' ? 'input' : event.type;
// If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.
if (debounceTimerID === undefined) {
handler({
event: event,
name,
global: globalListener,
});
lastCapturedEvent = event;
}
// If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.
// If that's the case, emit the previous event and store locally the newly-captured DOM event.
else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {
handler({
event: event,
name,
global: globalListener,
});
lastCapturedEvent = event;
}
// Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
clearTimeout(debounceTimerID);
debounceTimerID = WINDOW.setTimeout(() => {
debounceTimerID = undefined;
}, debounceDuration);
};
}

Well, then I guess we could do console breadcrumbs? 😅

@billyvg billyvg added the CI-Overhead-Measurements Add this label to run SDK overhead measurements on a PR label May 26, 2023
@billyvg billyvg added CI-Overhead-Measurements Add this label to run SDK overhead measurements on a PR and removed CI-Overhead-Measurements Add this label to run SDK overhead measurements on a PR labels May 26, 2023
@billyvg billyvg merged commit f359ef3 into develop May 26, 2023
57 of 58 checks passed
@billyvg billyvg deleted the fn/many-network branch May 26, 2023 18:23
thoomasbro added a commit to MTES-MCT/monitorenv that referenced this pull request Jul 25, 2023
<p>This PR was automatically created by Snyk using the credentials of a
real user.</p><br /><h3>Snyk has created this PR to upgrade
@sentry/tracing from 7.47.0 to 7.55.2.</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 **14 versions** ahead of your current
version.
- The recommended version was released **24 days ago**, on 2023-06-14.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@sentry/tracing</b></summary>
    <ul>
      <li>
<b>7.55.2</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.55.2">2023-06-14</a></br><ul>
<li>fix(replay): Stop exporting <code>EventType</code> from <code>@
sentry-internal/rrweb</code> (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1756830383"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8334"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8334/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8334">#8334</a>)</li>
<li>fix(serverless): Export captureCheckIn (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1756807857" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8333"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8333/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8333">#8333</a>)</li>
</ul>
<h2>Bundle size <g-emoji class="g-emoji" alias="package"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png">📦</g-emoji></h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (gzipped + minified)</td>
<td>21.12 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (minified)</td>
<td>65.86 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (gzipped + minified)</td>
<td>19.65 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (minified)</td>
<td>58.34 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (gzipped + minified)</td>
<td>21.28 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (minified)</td>
<td>69.26 KB</td>
</tr>
<tr>
<td>@ sentry/react - Webpack (gzipped + minified)</td>
<td>21.31 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs Client - Webpack (gzipped + minified)</td>
<td>49.23 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES5 CDN Bundle (gzipped +
minified)</td>
<td>28.74 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES6 CDN Bundle (gzipped +
minified)</td>
<td>26.98 KB</td>
</tr>
<tr>
<td>@ sentry/replay ES6 CDN Bundle (gzipped + minified)</td>
<td>48.6 KB</td>
</tr>
<tr>
<td>@ sentry/replay - Webpack (gzipped + minified)</td>
<td>42.26 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing + @ sentry/replay - ES6 CDN
Bundle (gzipped + minified)</td>
<td>67.63 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/replay - ES6 CDN Bundle (gzipped +
minified)</td>
<td>60.54 KB</td>
</tr>
</tbody>
</table>
      </li>
      <li>
<b>7.55.1</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.55.1">2023-06-14</a></br><ul>
<li>fix(replay): Do not export types from <code>@
sentry-internal/rrweb</code> (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1756275538"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8329"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8329/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8329">#8329</a>)</li>
</ul>
<h2>Bundle size <g-emoji class="g-emoji" alias="package"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png">📦</g-emoji></h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (gzipped + minified)</td>
<td>21.12 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (minified)</td>
<td>65.86 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (gzipped + minified)</td>
<td>19.65 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (minified)</td>
<td>58.34 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (gzipped + minified)</td>
<td>21.28 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (minified)</td>
<td>69.26 KB</td>
</tr>
<tr>
<td>@ sentry/react - Webpack (gzipped + minified)</td>
<td>21.31 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs Client - Webpack (gzipped + minified)</td>
<td>49.23 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES5 CDN Bundle (gzipped +
minified)</td>
<td>28.74 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES6 CDN Bundle (gzipped +
minified)</td>
<td>26.98 KB</td>
</tr>
<tr>
<td>@ sentry/replay ES6 CDN Bundle (gzipped + minified)</td>
<td>48.6 KB</td>
</tr>
<tr>
<td>@ sentry/replay - Webpack (gzipped + minified)</td>
<td>42.26 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing + @ sentry/replay - ES6 CDN
Bundle (gzipped + minified)</td>
<td>67.63 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/replay - ES6 CDN Bundle (gzipped +
minified)</td>
<td>60.54 KB</td>
</tr>
</tbody>
</table>
      </li>
      <li>
<b>7.55.0</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.55.0">2023-06-13</a></br><ul>
<li>feat(replay): Capture slow clicks (GA) (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1745423615" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8298"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8298/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8298">#8298</a>)</li>
<li>feat(replay): Improve types for replay recording events (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1727872045" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8224"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8224/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8224">#8224</a>)</li>
<li>fix(nextjs): Strip query params from transaction names of
navigations to unknown routes (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1737654471"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8278"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8278/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8278">#8278</a>)</li>
<li>fix(replay): Ignore max session life for buffered sessions (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1732933176" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8258"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8258/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8258">#8258</a>)</li>
<li>fix(sveltekit): Export captureCheckIn (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1750222676" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8313"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8313/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8313">#8313</a>)</li>
<li>ref(svelte): Add Svelte 4 as a peer dependency (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1738310865" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8280"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8280/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8280">#8280</a>)</li>
</ul>
<h2>Bundle size <g-emoji class="g-emoji" alias="package"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png">📦</g-emoji></h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (gzipped + minified)</td>
<td>21.12 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (minified)</td>
<td>65.86 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (gzipped + minified)</td>
<td>19.65 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (minified)</td>
<td>58.34 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (gzipped + minified)</td>
<td>21.28 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (minified)</td>
<td>69.26 KB</td>
</tr>
<tr>
<td>@ sentry/react - Webpack (gzipped + minified)</td>
<td>21.31 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs Client - Webpack (gzipped + minified)</td>
<td>49.23 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES5 CDN Bundle (gzipped +
minified)</td>
<td>28.74 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES6 CDN Bundle (gzipped +
minified)</td>
<td>26.98 KB</td>
</tr>
<tr>
<td>@ sentry/replay ES6 CDN Bundle (gzipped + minified)</td>
<td>48.68 KB</td>
</tr>
<tr>
<td>@ sentry/replay - Webpack (gzipped + minified)</td>
<td>42.26 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing + @ sentry/replay - ES6 CDN
Bundle (gzipped + minified)</td>
<td>67.63 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/replay - ES6 CDN Bundle (gzipped +
minified)</td>
<td>60.54 KB</td>
</tr>
</tbody>
</table>
      </li>
      <li>
<b>7.54.0</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.54.0">2023-06-01</a></br><h3>Important
Changes</h3>
<ul>
<li>
<p><strong>feat(core): Add default entries to
<code>ignoreTransactions</code> for Healthchecks <a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1722232714" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8191"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8191/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8191">#8191</a></strong></p>
<p>All SDKs now filter out health check transactions by default.<br>
These are transactions where the transaction name matches typical API
health check calls, such as <code>/^.*healthy.*$/</code> or <code>/^.
*heartbeat.*$/</code>. Take a look at <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/blob/8c6ad156829f7c4eec34e4a67e6dd866ba482d5d/packages/core/src/integrations/inboundfilters.ts#L8C2-L16">this
list</a> to learn which regexes we currently use to match transaction
names.<br>
We believe that these transactions do not provide value in most cases
and we want to save you some of your quota by filtering them out by
default.<br>
These filters are implemented as default values for the top level
<code>ignoreTransactions</code> option.</p>
<p>You can disable this filtering by manually specifiying the
<code>InboundFilters</code> integration and setting the
<code>disableTransactionDefaults</code> option:</p>
<div class="highlight highlight-source-js notranslate position-relative
overflow-auto" data-snippet-clipboard-copy-content="Sentry.init({
  //...
integrations: [new InboundFilters({ disableTransactionDefaults: true
})],
})"><pre><span class="pl-v">Sentry</span><span
class="pl-kos">.</span><span class="pl-en">init</span><span
class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c">//...</span>
<span class="pl-c1">integrations</span>: <span
class="pl-kos">[</span><span class="pl-k">new</span> <span
class="pl-v">InboundFilters</span><span class="pl-kos">(</span><span
class="pl-kos">{</span> <span
class="pl-c1">disableTransactionDefaults</span>: <span
class="pl-c1">true</span> <span class="pl-kos">}</span><span
class="pl-kos">)</span><span class="pl-kos">]</span><span
class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
</li>
<li>
<p><strong>feat(replay): Add <code>mutationBreadcrumbLimit</code> and
<code>mutationLimit</code> to Replay Options (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1728110210" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8228"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8228/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8228">#8228</a>)</strong></p>
<p>The previously experimental options
<code>mutationBreadcumbLimit</code> and <code>mutationLimit</code> have
been promoted to regular Replay integration options.</p>
<p>A high number of DOM mutations (in a single event loop) can cause
performance regressions in end-users' browsers.<br>
Use <code>mutationBreadcrumbLimit</code> to send a breadcrumb along with
your recording if the mutation limit was reached.<br>
Use <code>mutationLimit</code> to stop recording if the mutation limit
was reached.</p>
</li>
<li>
<p><strong>feat(sveltekit): Add source maps support for Vercel (lambda)
(<a class="issue-link js-issue-link" data-error-text="Failed to load
title" data-id="1732457184" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8256"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8256/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8256">#8256</a>)</strong></p>
<ul>
<li>feat(sveltekit): Auto-detect SvelteKit adapters (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1722416405" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8193"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8193/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8193">#8193</a>)</li>
</ul>
<p>The SvelteKit SDK can now be used if you deploy your SvelteKit app to
Vercel.<br>
By default, the SDK's Vite plugin will detect the used adapter and
adjust the source map uploading config as necessary.<br>
If you want to override the default adapter detection, you can specify
the <code>adapter</code> option in the <code>sentrySvelteKit</code>
options:</p>
<div class="highlight highlight-source-js notranslate position-relative
overflow-auto" data-snippet-clipboard-copy-content="// vite.config.js
export default defineConfig({
  plugins: [
    sentrySvelteKit({
      adapter: 'vercel',
    }),
    sveltekit(),
  ],
});"><pre><span class="pl-c">// vite.config.js</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span
class="pl-en">defineConfig</span><span class="pl-kos">(</span><span
class="pl-kos">{</span>
  <span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
<span class="pl-en">sentrySvelteKit</span><span
class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">adapter</span>: <span
class="pl-s">'vercel'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span
class="pl-kos">,</span>
<span class="pl-en">sveltekit</span><span class="pl-kos">(</span><span
class="pl-kos">)</span><span class="pl-kos">,</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span
class="pl-kos">;</span></pre></div>
<p>Currently, the Vite plugin will configure itself correctly for
<code>@ sveltejs/adapter-auto</code>, <code>@
sveltejs/adapter-vercel</code> and <code>@
sveltejs/adapter-node</code>.</p>
<p><strong>Important:</strong> The SvelteKit SDK is not yet compatible
with Vercel's edge runtime.<br>
It will only work for lambda functions.</p>
</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>feat(replay): Throttle breadcrumbs to max 300/5s (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1702246191" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8086"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8086/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8086">#8086</a>)</li>
<li>feat(sveltekit): Add option to control handling of unknown server
routes (<a class="issue-link js-issue-link" data-error-text="Failed to
load title" data-id="1723743703" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8201"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8201/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8201">#8201</a>)</li>
<li>fix(node): Strip query and fragment from request URLs without route
parameters (<a class="issue-link js-issue-link" data-error-text="Failed
to load title" data-id="1725270222" data-permission-text="Title is
private"
data-url="getsentry/sentry-javascript#8213"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8213/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8213">#8213</a>)</li>
<li>fix(remix): Don't log missing parameters warning on server-side. (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1736125317" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8269"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8269/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8269">#8269</a>)</li>
<li>fix(remix): Pass <code>loadContext</code> through wrapped document
request function (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1735985740"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8268"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8268/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8268">#8268</a>)</li>
<li>fix(replay): Guard against missing key (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1731818666" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8246"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8246/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8246">#8246</a>)</li>
<li>fix(sveltekit): Avoid capturing redirects and 4xx Http errors in
request Handlers (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1725828625"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8215"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8215/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8215">#8215</a>)</li>
<li>fix(sveltekit): Bump <code>magicast</code> to support
<code>satisfied</code> keyword (<a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1732167579"
data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8254"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8254/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8254">#8254</a>)</li>
<li>fix(wasm): Avoid throwing an error when WASM modules are loaded from
blobs (<a class="issue-link js-issue-link" data-error-text="Failed to
load title" data-id="1734077512" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8263"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8263/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8263">#8263</a>)</li>
</ul>
<h2>Bundle size <g-emoji class="g-emoji" alias="package"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png">📦</g-emoji></h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (gzipped + minified)</td>
<td>21.12 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (minified)</td>
<td>65.86 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (gzipped + minified)</td>
<td>19.65 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (minified)</td>
<td>58.34 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (gzipped + minified)</td>
<td>21.28 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (minified)</td>
<td>69.26 KB</td>
</tr>
<tr>
<td>@ sentry/react - Webpack (gzipped + minified)</td>
<td>21.31 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs Client - Webpack (gzipped + minified)</td>
<td>49.23 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES5 CDN Bundle (gzipped +
minified)</td>
<td>28.74 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES6 CDN Bundle (gzipped +
minified)</td>
<td>26.98 KB</td>
</tr>
<tr>
<td>@ sentry/replay ES6 CDN Bundle (gzipped + minified)</td>
<td>48.58 KB</td>
</tr>
<tr>
<td>@ sentry/replay - Webpack (gzipped + minified)</td>
<td>42.28 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing + @ sentry/replay - ES6 CDN
Bundle (gzipped + minified)</td>
<td>67.63 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/replay - ES6 CDN Bundle (gzipped +
minified)</td>
<td>60.55 KB</td>
</tr>
</tbody>
</table>
      </li>
      <li>
<b>7.53.1</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.53.1">2023-05-24</a></br><ul>
<li>chore(deps): bump socket.io-parser from 4.2.1 to 4.2.3 (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1722974013" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8196"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8196/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8196">#8196</a>)</li>
<li>chore(svelte): Bump magic-string to 0.30.0 (<a class="issue-link
js-issue-link" data-error-text="Failed to load title"
data-id="1723489938" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8197"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8197/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8197">#8197</a>)</li>
<li>fix(core): Fix racecondition that modifies in-flight sessions (<a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1724013708" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8203"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8203/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8203">#8203</a>)</li>
<li>fix(node): Catch <code>os.uptime()</code> throwing because of EPERM
(<a class="issue-link js-issue-link" data-error-text="Failed to load
title" data-id="1724056753" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8206"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8206/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8206">#8206</a>)</li>
<li>fix(replay): Fix buffered replays creating replay w/o error occuring
(<a class="issue-link js-issue-link" data-error-text="Failed to load
title" data-id="1717667664" data-permission-text="Title is private"
data-url="getsentry/sentry-javascript#8168"
data-hovercard-type="pull_request"
data-hovercard-url="/getsentry/sentry-javascript/pull/8168/hovercard"
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/8168">#8168</a>)</li>
</ul>
<h2>Bundle size <g-emoji class="g-emoji" alias="package"
fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png">📦</g-emoji></h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (gzipped + minified)</td>
<td>21.05 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES5 CDN Bundle (minified)</td>
<td>65.69 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (gzipped + minified)</td>
<td>19.59 KB</td>
</tr>
<tr>
<td>@ sentry/browser - ES6 CDN Bundle (minified)</td>
<td>58.16 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (gzipped + minified)</td>
<td>21.21 KB</td>
</tr>
<tr>
<td>@ sentry/browser - Webpack (minified)</td>
<td>69.08 KB</td>
</tr>
<tr>
<td>@ sentry/react - Webpack (gzipped + minified)</td>
<td>21.23 KB</td>
</tr>
<tr>
<td>@ sentry/nextjs Client - Webpack (gzipped + minified)</td>
<td>49.16 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES5 CDN Bundle (gzipped +
minified)</td>
<td>28.67 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing - ES6 CDN Bundle (gzipped +
minified)</td>
<td>26.91 KB</td>
</tr>
<tr>
<td>@ sentry/replay ES6 CDN Bundle (gzipped + minified)</td>
<td>48.25 KB</td>
</tr>
<tr>
<td>@ sentry/replay - Webpack (gzipped + minified)</td>
<td>42.1 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/tracing + @ sentry/replay - ES6 CDN
Bundle (gzipped + minified)</td>
<td>67.22 KB</td>
</tr>
<tr>
<td>@ sentry/browser + @ sentry/replay - ES6 CDN Bundle (gzipped +
minified)</td>
<td>60.12 KB</td>
</tr>
</tbody>
</table>
      </li>
      <li>
<b>7.53.0</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.53.0">2023-05-23</a></br><a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.53.0">
Read more </a>
      </li>
      <li>
<b>7.52.1</b> - <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.52.1">2023-05-15</a></br><a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.52.1">
Read more </a>
      </li>
      <li>
        <b>7.52.0</b> - 2023-05-15
      </li>
      <li>
        <b>7.51.2</b> - 2023-05-08
      </li>
      <li>
        <b>7.51.1</b> - 2023-05-08
      </li>
      <li>
        <b>7.51.0</b> - 2023-05-04
      </li>
      <li>
        <b>7.50.0</b> - 2023-04-27
      </li>
      <li>
        <b>7.49.0</b> - 2023-04-20
      </li>
      <li>
        <b>7.48.0</b> - 2023-04-14
      </li>
      <li>
        <b>7.47.0</b> - 2023-04-05
      </li>
    </ul>
from <a
href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases">@sentry/tracing
GitHub release notes</a>
  </details>
</details>
<hr/>

**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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJmMjA4ODYwYS0zZTM2LTRmNmQtOGM4Ni00N2JjY2RiZWI4YjMiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImYyMDg4NjBhLTNlMzYtNGY2ZC04Yzg2LTQ3YmNjZGJlYjhiMyJ9fQ=="
width="0" height="0"/>

🧐 [View latest project
report](https://app.snyk.io/org/mtes-mct/project/afb3e19a-88e3-4a0e-9409-d0f9cfdc75b5?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/mtes-mct/project/afb3e19a-88e3-4a0e-9409-d0f9cfdc75b5/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/mtes-mct/project/afb3e19a-88e3-4a0e-9409-d0f9cfdc75b5/settings/integration?pkg&#x3D;@sentry/tracing&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

<!---
(snyk:metadata:{"prId":"f208860a-3e36-4f6d-8c86-47bccdbeb8b3","prPublicId":"f208860a-3e36-4f6d-8c86-47bccdbeb8b3","dependencies":[{"name":"@sentry/tracing","from":"7.47.0","to":"7.55.2"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/mtes-mct/project/afb3e19a-88e3-4a0e-9409-d0f9cfdc75b5?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"afb3e19a-88e3-4a0e-9409-d0f9cfdc75b5","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":14,"publishedDate":"2023-06-14T14:26:32.924Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]})
--->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-Overhead-Measurements Add this label to run SDK overhead measurements on a PR Package: replay
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit # of replay breadcrumbs captured per timeframe
5 participants