Skip to content

feat(node): Drop 401-404 and 3xx status code spans by default #16972

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 5 commits into from
Jul 15, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jul 14, 2025

In addition to 404, we now also drop 401, 402, 403 and 3xx (e.g. 301 MOVED_PERMANTENTLY) spans by default.

These are usually not helpful.

Noticed this in some react-router E2E test where 301 spans were messing with the test, but these should not even be captured really.

In addition to 404, we now also drop 3xx (e.g. 301 MOVED_PERMANTENTLY) spans by default.

These are usually not helpful.
@mydea mydea requested review from Lms24, chargome and andreiborza July 14, 2025 09:18
@mydea mydea self-assigned this Jul 14, 2025
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Jul 14, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.88 kB - -
@sentry/browser - with treeshaking flags 22.35 kB - -
@sentry/browser (incl. Tracing) 39.75 kB - -
@sentry/browser (incl. Tracing, Replay) 77.88 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.61 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.58 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 94.68 kB - -
@sentry/browser (incl. Feedback) 40.58 kB - -
@sentry/browser (incl. sendFeedback) 28.56 kB - -
@sentry/browser (incl. FeedbackAsync) 33.46 kB - -
@sentry/react 25.61 kB - -
@sentry/react (incl. Tracing) 41.72 kB - -
@sentry/vue 28.31 kB - -
@sentry/vue (incl. Tracing) 41.53 kB - -
@sentry/svelte 23.9 kB - -
CDN Bundle 25.18 kB - -
CDN Bundle (incl. Tracing) 39.44 kB - -
CDN Bundle (incl. Tracing, Replay) 75.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 80.91 kB - -
CDN Bundle - uncompressed 73.54 kB - -
CDN Bundle (incl. Tracing) - uncompressed 116.99 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 243.99 kB - -
@sentry/nextjs (client) 43.32 kB - -
@sentry/sveltekit (client) 40.2 kB - -
@sentry/node 167.63 kB +0.02% +29 B 🔺
@sentry/node - without tracing 100.32 kB +0.03% +27 B 🔺
@sentry/aws-serverless 128.44 kB +0.03% +27 B 🔺

View base workflow run

@@ -108,20 +108,3 @@ test('Should send a transaction and an error event for a faulty generateViewport

expect(errorEvent.transaction).toBe('Page.generateViewport (/generation-functions)');
});

Copy link
Member

Choose a reason for hiding this comment

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

Removed this test because the redirect is no longer sent.

@andreiborza andreiborza requested a review from chargome July 14, 2025 21:54
@andreiborza andreiborza changed the title feat(node): Drop 3xx status code spans by default feat(node): Drop 401-404 and 3xx status code spans by default Jul 14, 2025
@andreiborza
Copy link
Member

@mydea updated failing tests and updated the range to 401-404. Could you please have another look?

@mydea
Copy link
Member Author

mydea commented Jul 15, 2025

can't approve, but looks good - merging in ❤️

@mydea mydea merged commit 47f85b9 into develop Jul 15, 2025
168 checks passed
@mydea mydea deleted the fn/drop-3xx-spans branch July 15, 2025 08:27
msonnb pushed a commit that referenced this pull request Jul 15, 2025
In addition to 404, we now also drop 401, 402, 403 and 3xx (e.g. 301
MOVED_PERMANTENTLY) spans by default.

These are usually not helpful.

Noticed this in some react-router E2E test where 301 spans were messing
with the test, but these should not even be captured really.

---------

Co-authored-by: Andrei Borza <[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