Skip to content

feat(node): Add ignoreStaticAssets - #17370

Merged
chargome merged 4 commits into
developfrom
cg-ignore-static-assets
Aug 11, 2025
Merged

feat(node): Add ignoreStaticAssets#17370
chargome merged 4 commits into
developfrom
cg-ignore-static-assets

Conversation

@chargome

Copy link
Copy Markdown
Member

Adds a new option ignoreStaticAssets to the node httpIntegration which is true by default.

It ignores tracing requests on the server to assets like favicon.ico etc.

closes https://linear.app/getsentry/issue/JS-842/nextjs-sdk-creates-httpserver-traces-for-resource-requests

@chargomechargome self-assigned this Aug 11, 2025
@linear

linearBot commented Aug 11, 2025

Copy link
Copy Markdown

@chargomechargome changed the title ignore stufffeat(node): Add ignoreStaticAssetsAug 11, 2025
cursor[bot]

This comment was marked as outdated.

Comment threadpackages/node/src/integrations/http/index.ts
Comment threadpackages/node/src/integrations/http/index.ts Outdated

@mydeamydea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is cool! 🚀

cursor[bot]

This comment was marked as outdated.

@github-actions

github-actionsBot commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser24.11 kB--
@sentry/browser - with treeshaking flags22.68 kB--
@sentry/browser (incl. Tracing)39.83 kB--
@sentry/browser (incl. Tracing, Replay)77.92 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags67.77 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)82.63 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)94.73 kB--
@sentry/browser (incl. Feedback)40.77 kB--
@sentry/browser (incl. sendFeedback)28.77 kB--
@sentry/browser (incl. FeedbackAsync)33.66 kB--
@sentry/react25.83 kB--
@sentry/react (incl. Tracing)41.8 kB--
@sentry/vue28.59 kB--
@sentry/vue (incl. Tracing)41.64 kB--
@sentry/svelte24.14 kB--
CDN Bundle25.62 kB--
CDN Bundle (incl. Tracing)39.72 kB--
CDN Bundle (incl. Tracing, Replay)75.77 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)81.19 kB--
CDN Bundle - uncompressed74.89 kB--
CDN Bundle (incl. Tracing) - uncompressed117.52 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed231.78 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed244.38 kB--
@sentry/nextjs (client)43.83 kB--
@sentry/sveltekit (client)40.27 kB--
@sentry/node-core47.78 kB--
@sentry/node146.81 kB+0.11%+149 B 🔺
@sentry/node - without tracing92.02 kB+0.16%+143 B 🔺
@sentry/aws-serverless103.45 kB+0.15%+148 B 🔺

View base workflow run

Comment threadpackages/node/src/integrations/http.ts Outdated
Comment threadpackages/node/src/integrations/http.ts Outdated
Comment threadpackages/node/test/integrations/http.test.ts

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding this so quickly!
(fwiw, I noticed this in a private SvelteKit app as well over the weekend, where I used httpIntegration. Glad we fixed this on a fundamental level!)

Sign up for freeto 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

@chargome@mydea@Lms24