Uh oh!
There was an error while loading. Please reload this page.
feat(replay): Stop fixing truncated JSONs in SDK - #9437
Conversation
size-limit report 📦
|
AbhiPrasad
commented
Nov 2, 2023
Don't we need the un-truncated JSON to do proper PII tripping? Is this something we can do in Relay? |
Just a note. We need to make make sure the UI can do this efficiently so we don't end up just transferring the problem. If possible, I would look into reconstructing this on the server side or in Relay if necessary |
mydea
commented
Nov 2, 2023
pulling in @cmanallen from a slack conversation: PII stripping may be "overly" cautious, but we can tweak this server side a bit to allow partial PII stripping easier. We can also iterate on this over time. note also that we only transfer a string if we exceed the max. length. Smaller payloads are still sent as POJO.
this is true! However, the problem is much smaller because you'll only look at a single body at a time, so the potential impact is much smaller. But with this implementation, we are also free to decide later to actually do that in relay - it's kind of abstracted away from the SDK (just needs to happen somewhere. This is just the easiest implementation of this: getsentry/sentry#59266 but we can also do that elsewhere! |
94665d5 to
3553eaeCompareThis implements the changes from the SDK here: getsentry/sentry-javascript#9437 If it encounters a request/response body with a `MAYBE_TRUNCATED_JSON` warning, it will try to auto-fix it with the same logic as we did in the SDK.
This is potentially performance intensive, so we should just do this in the UI instead.
3553eae to
19c46c8Compare<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.77.0 to 7.78.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 **1 version** ahead of your current version. - The recommended version was released **21 days ago**, on 2023-11-08. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@sentry/tracing</b></summary> <ul> <li> <b>7.78.0</b> - <a href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.78.0">2023-11-08</a></br><h3>Important Changes</h3> <ul> <li><strong>Replay Bundle Size improvements</strong></li> </ul> <p>We've dramatically decreased the bundle size of our Replay package, reducing the minified & gzipped bundle size by ~20 KB!<br> This was possible by extensive use of tree shaking and a host of small changes to reduce our footprint:</p> <ul> <li>feat(replay): Update rrweb to 2.2.0 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1969840261" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9414" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9414/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9414">#9414</a>)</li> <li>ref(replay): Use fflate instead of pako for compression (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1973888368" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9436" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9436/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9436">#9436</a>)</li> </ul> <p>By using <a href="https://docs.sentry.io/platforms/javascript/configuration/tree-shaking/" rel="nofollow">tree shaking</a> it is possible to shave off up to 10 additional KB of the bundle.</p> <h4>Other Changes</h4> <ul> <li>feat(astro): Add Sentry middleware (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1975970592" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9445" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9445/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9445">#9445</a>)</li> <li>feat(feedback): Add "outline focus" and "foreground hover" vars (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980194755" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9462" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9462/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9462">#9462</a>)</li> <li>feat(feedback): Add <code>openDialog</code> and <code>closeDialog</code> onto integration interface (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980365149" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9464" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9464/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9464">#9464</a>)</li> <li>feat(feedback): Implement new user feedback embeddable widget (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1935671114" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9217" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9217/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9217">#9217</a>)</li> <li>feat(nextjs): Add automatic sourcemapping for edge part of the SDK (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1978949258" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9454" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9454/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9454">#9454</a>)</li> <li>feat(nextjs): Add client routing instrumentation for app router (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1975986800" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9446" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9446/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9446">#9446</a>)</li> <li>feat(node-experimental): Add hapi tracing support (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1976171644" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9449" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9449/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9449">#9449</a>)</li> <li>feat(replay): Allow to configure <code>beforeErrorSampling</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1981293109" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9470" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9470/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9470">#9470</a>)</li> <li>feat(replay): Stop fixing truncated JSONs in SDK (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1974067491" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9437" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9437/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9437">#9437</a>)</li> <li>fix(nextjs): Fix sourcemaps resolving for local dev when basePath is set (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1979432990" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9457" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9457/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9457">#9457</a>)</li> <li>fix(nextjs): Only inject basepath in dev mode (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980792362" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9465" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9465/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9465">#9465</a>)</li> <li>fix(replay): Ensure we stop for rate limit headers (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1970781544" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9420" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9420/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9420">#9420</a>)</li> <li>ref(feedback): Add treeshaking for logger statements (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1981622966" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9475" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9475/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9475">#9475</a>)</li> <li>ref(replay): Use rrweb for slow click detection (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1967891591" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9408" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9408/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9408">#9408</a>)</li> <li>build(polyfills): Remove output format specific logic (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980848552" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9467" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9467/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9467">#9467</a>)</li> </ul> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>65.24 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped)</td> <td>55.48 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - Webpack (gzipped)</td> <td>30.97 KB</td> </tr> <tr> <td>@ sentry/browser - Webpack (gzipped)</td> <td>21.29 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped)</td> <td>61.82 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped)</td> <td>29.09 KB</td> </tr> <tr> <td>@ sentry/browser - ES6 CDN Bundle (gzipped)</td> <td>21.23 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed)</td> <td>194.87 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed)</td> <td>88.28 KB</td> </tr> <tr> <td>@ sentry/browser - ES6 CDN Bundle (minified & uncompressed)</td> <td>63.28 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped)</td> <td>31.8 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>65.61 KB</td> </tr> <tr> <td>@ sentry/react - Webpack (gzipped)</td> <td>21.34 KB</td> </tr> <tr> <td>@ sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>82.34 KB</td> </tr> <tr> <td>@ sentry/nextjs Client - Webpack (gzipped)</td> <td>48.12 KB</td> </tr> <tr> <td>@ sentry-internal/feedback - Webpack (gzipped)</td> <td>15.81 KB</td> </tr> </tbody> </table> </li> <li> <b>7.77.0</b> - 2023-10-31 </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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJhMDNmMTYzYi04NzI1LTQ3ZGUtODQ3Yy1iMWU4YzdjMGYwODkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImEwM2YxNjNiLTg3MjUtNDdkZS04NDdjLWIxZThjN2MwZjA4OSJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr) 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/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/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/settings/integration?pkg=@sentry/tracing&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) <!--- (snyk:metadata:{"prId":"a03f163b-8725-47de-847c-b1e8c7c0f089","prPublicId":"a03f163b-8725-47de-847c-b1e8c7c0f089","dependencies":[{"name":"@sentry/tracing","from":"7.77.0","to":"7.78.0"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"8a1190df-0364-4a9a-93bd-a9f28b54daf6","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2023-11-08T10:34:00.370Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]}) ---> Co-authored-by: snyk-bot <snyk-bot@snyk.io>
<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/browser from 7.77.0 to 7.78.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 **1 version** ahead of your current version. - The recommended version was released **21 days ago**, on 2023-11-08. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@sentry/browser</b></summary> <ul> <li> <b>7.78.0</b> - <a href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.78.0">2023-11-08</a></br><h3>Important Changes</h3> <ul> <li><strong>Replay Bundle Size improvements</strong></li> </ul> <p>We've dramatically decreased the bundle size of our Replay package, reducing the minified & gzipped bundle size by ~20 KB!<br> This was possible by extensive use of tree shaking and a host of small changes to reduce our footprint:</p> <ul> <li>feat(replay): Update rrweb to 2.2.0 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1969840261" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9414" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9414/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9414">#9414</a>)</li> <li>ref(replay): Use fflate instead of pako for compression (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1973888368" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9436" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9436/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9436">#9436</a>)</li> </ul> <p>By using <a href="https://docs.sentry.io/platforms/javascript/configuration/tree-shaking/" rel="nofollow">tree shaking</a> it is possible to shave off up to 10 additional KB of the bundle.</p> <h4>Other Changes</h4> <ul> <li>feat(astro): Add Sentry middleware (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1975970592" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9445" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9445/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9445">#9445</a>)</li> <li>feat(feedback): Add "outline focus" and "foreground hover" vars (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980194755" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9462" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9462/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9462">#9462</a>)</li> <li>feat(feedback): Add <code>openDialog</code> and <code>closeDialog</code> onto integration interface (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980365149" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9464" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9464/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9464">#9464</a>)</li> <li>feat(feedback): Implement new user feedback embeddable widget (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1935671114" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9217" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9217/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9217">#9217</a>)</li> <li>feat(nextjs): Add automatic sourcemapping for edge part of the SDK (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1978949258" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9454" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9454/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9454">#9454</a>)</li> <li>feat(nextjs): Add client routing instrumentation for app router (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1975986800" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9446" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9446/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9446">#9446</a>)</li> <li>feat(node-experimental): Add hapi tracing support (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1976171644" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9449" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9449/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9449">#9449</a>)</li> <li>feat(replay): Allow to configure <code>beforeErrorSampling</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1981293109" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9470" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9470/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9470">#9470</a>)</li> <li>feat(replay): Stop fixing truncated JSONs in SDK (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1974067491" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9437" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9437/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9437">#9437</a>)</li> <li>fix(nextjs): Fix sourcemaps resolving for local dev when basePath is set (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1979432990" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9457" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9457/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9457">#9457</a>)</li> <li>fix(nextjs): Only inject basepath in dev mode (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980792362" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9465" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9465/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9465">#9465</a>)</li> <li>fix(replay): Ensure we stop for rate limit headers (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1970781544" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9420" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9420/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9420">#9420</a>)</li> <li>ref(feedback): Add treeshaking for logger statements (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1981622966" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9475" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9475/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9475">#9475</a>)</li> <li>ref(replay): Use rrweb for slow click detection (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1967891591" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9408" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9408/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9408">#9408</a>)</li> <li>build(polyfills): Remove output format specific logic (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980848552" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9467" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9467/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9467">#9467</a>)</li> </ul> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>65.24 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped)</td> <td>55.48 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - Webpack (gzipped)</td> <td>30.97 KB</td> </tr> <tr> <td>@ sentry/browser - Webpack (gzipped)</td> <td>21.29 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped)</td> <td>61.82 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped)</td> <td>29.09 KB</td> </tr> <tr> <td>@ sentry/browser - ES6 CDN Bundle (gzipped)</td> <td>21.23 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed)</td> <td>194.87 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed)</td> <td>88.28 KB</td> </tr> <tr> <td>@ sentry/browser - ES6 CDN Bundle (minified & uncompressed)</td> <td>63.28 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped)</td> <td>31.8 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>65.61 KB</td> </tr> <tr> <td>@ sentry/react - Webpack (gzipped)</td> <td>21.34 KB</td> </tr> <tr> <td>@ sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>82.34 KB</td> </tr> <tr> <td>@ sentry/nextjs Client - Webpack (gzipped)</td> <td>48.12 KB</td> </tr> <tr> <td>@ sentry-internal/feedback - Webpack (gzipped)</td> <td>15.81 KB</td> </tr> </tbody> </table> </li> <li> <b>7.77.0</b> - 2023-10-31 </li> </ul> from <a href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases">@sentry/browser 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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIzMTg1YmNlNC00NzhlLTQzN2YtOWEyZC0zNDRhNDU4YTk4MzIiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjMxODViY2U0LTQ3OGUtNDM3Zi05YTJkLTM0NGE0NThhOTgzMiJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr) 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/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/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/settings/integration?pkg=@sentry/browser&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) <!--- (snyk:metadata:{"prId":"3185bce4-478e-437f-9a2d-344a458a9832","prPublicId":"3185bce4-478e-437f-9a2d-344a458a9832","dependencies":[{"name":"@sentry/browser","from":"7.77.0","to":"7.78.0"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"8a1190df-0364-4a9a-93bd-a9f28b54daf6","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2023-11-08T10:32:57.066Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]}) ---> Co-authored-by: snyk-bot <snyk-bot@snyk.io>
<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/node from 7.77.0 to 7.78.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 **1 version** ahead of your current version. - The recommended version was released **21 days ago**, on 2023-11-08. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@sentry/node</b></summary> <ul> <li> <b>7.78.0</b> - <a href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases/tag/7.78.0">2023-11-08</a></br><h3>Important Changes</h3> <ul> <li><strong>Replay Bundle Size improvements</strong></li> </ul> <p>We've dramatically decreased the bundle size of our Replay package, reducing the minified & gzipped bundle size by ~20 KB!<br> This was possible by extensive use of tree shaking and a host of small changes to reduce our footprint:</p> <ul> <li>feat(replay): Update rrweb to 2.2.0 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1969840261" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9414" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9414/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9414">#9414</a>)</li> <li>ref(replay): Use fflate instead of pako for compression (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1973888368" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9436" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9436/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9436">#9436</a>)</li> </ul> <p>By using <a href="https://docs.sentry.io/platforms/javascript/configuration/tree-shaking/" rel="nofollow">tree shaking</a> it is possible to shave off up to 10 additional KB of the bundle.</p> <h4>Other Changes</h4> <ul> <li>feat(astro): Add Sentry middleware (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1975970592" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9445" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9445/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9445">#9445</a>)</li> <li>feat(feedback): Add "outline focus" and "foreground hover" vars (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980194755" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9462" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9462/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9462">#9462</a>)</li> <li>feat(feedback): Add <code>openDialog</code> and <code>closeDialog</code> onto integration interface (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980365149" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9464" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9464/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9464">#9464</a>)</li> <li>feat(feedback): Implement new user feedback embeddable widget (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1935671114" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9217" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9217/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9217">#9217</a>)</li> <li>feat(nextjs): Add automatic sourcemapping for edge part of the SDK (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1978949258" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9454" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9454/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9454">#9454</a>)</li> <li>feat(nextjs): Add client routing instrumentation for app router (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1975986800" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9446" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9446/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9446">#9446</a>)</li> <li>feat(node-experimental): Add hapi tracing support (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1976171644" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9449" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9449/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9449">#9449</a>)</li> <li>feat(replay): Allow to configure <code>beforeErrorSampling</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1981293109" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9470" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9470/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9470">#9470</a>)</li> <li>feat(replay): Stop fixing truncated JSONs in SDK (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1974067491" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9437" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9437/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9437">#9437</a>)</li> <li>fix(nextjs): Fix sourcemaps resolving for local dev when basePath is set (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1979432990" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9457" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9457/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9457">#9457</a>)</li> <li>fix(nextjs): Only inject basepath in dev mode (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980792362" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9465" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9465/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9465">#9465</a>)</li> <li>fix(replay): Ensure we stop for rate limit headers (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1970781544" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9420" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9420/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9420">#9420</a>)</li> <li>ref(feedback): Add treeshaking for logger statements (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1981622966" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9475" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9475/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9475">#9475</a>)</li> <li>ref(replay): Use rrweb for slow click detection (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1967891591" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9408" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9408/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9408">#9408</a>)</li> <li>build(polyfills): Remove output format specific logic (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1980848552" data-permission-text="Title is private" data-url="getsentry/sentry-javascript#9467" data-hovercard-type="pull_request" data-hovercard-url="/getsentry/sentry-javascript/pull/9467/hovercard" href="https://snyk.io/redirect/github/getsentry/sentry-javascript/pull/9467">#9467</a>)</li> </ul> <h2>Bundle size 📦</h2> <table> <thead> <tr> <th>Path</th> <th>Size</th> </tr> </thead> <tbody> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>65.24 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped)</td> <td>55.48 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - Webpack (gzipped)</td> <td>30.97 KB</td> </tr> <tr> <td>@ sentry/browser - Webpack (gzipped)</td> <td>21.29 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped)</td> <td>61.82 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped)</td> <td>29.09 KB</td> </tr> <tr> <td>@ sentry/browser - ES6 CDN Bundle (gzipped)</td> <td>21.23 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed)</td> <td>194.87 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed)</td> <td>88.28 KB</td> </tr> <tr> <td>@ sentry/browser - ES6 CDN Bundle (minified & uncompressed)</td> <td>63.28 KB</td> </tr> <tr> <td>@ sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped)</td> <td>31.8 KB</td> </tr> <tr> <td>@ sentry/react (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>65.61 KB</td> </tr> <tr> <td>@ sentry/react - Webpack (gzipped)</td> <td>21.34 KB</td> </tr> <tr> <td>@ sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped)</td> <td>82.34 KB</td> </tr> <tr> <td>@ sentry/nextjs Client - Webpack (gzipped)</td> <td>48.12 KB</td> </tr> <tr> <td>@ sentry-internal/feedback - Webpack (gzipped)</td> <td>15.81 KB</td> </tr> </tbody> </table> </li> <li> <b>7.77.0</b> - 2023-10-31 </li> </ul> from <a href="https://snyk.io/redirect/github/getsentry/sentry-javascript/releases">@sentry/node 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=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIwMzZiODVlMy0yYTA4LTQ4NTgtOTczNy0wOTQ5ZTRjMjU5ZmMiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjAzNmI4NWUzLTJhMDgtNDg1OC05NzM3LTA5NDllNGMyNTlmYyJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr) 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/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/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6/settings/integration?pkg=@sentry/node&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) <!--- (snyk:metadata:{"prId":"036b85e3-2a08-4858-9737-0949e4c259fc","prPublicId":"036b85e3-2a08-4858-9737-0949e4c259fc","dependencies":[{"name":"@sentry/node","from":"7.77.0","to":"7.78.0"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/mtes-mct/project/8a1190df-0364-4a9a-93bd-a9f28b54daf6?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"8a1190df-0364-4a9a-93bd-a9f28b54daf6","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2023-11-08T10:33:00.392Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]}) ---> Co-authored-by: snyk-bot <snyk-bot@snyk.io> Co-authored-by: Christophe Combelles <ccomb@free.fr>
This is potentially performance intensive, so we should just do this in the UI instead.
Part of #9426
We need to move the code that actually "fixes" the JSON to sentry. cc @ryan953
The logic should be:
If a request/response body has the
MAYBE_JSON_TRUNCATEDwarning, try to run it throughfixJsonPending on getsentry/sentry#59266 to be merged