Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Sep 18, 2025

This PR fixes a problem reported in #17451 where ignoring spans in idle root spans (pageload and navigations most prominently) caused the root span duration to be perceived much longer than reasonable. This is only a problem for idle spans in browser, so this PR applies a pragmatic fix to adjust the end time stamp:

We already adjust the time stamp when we end the idle span. So we might as well at this point take any to-be-removed-because-of-ignoreSpans spans out of this calculation. This should work well enough without throwing a bunch of idle-span specific logic into the client or completely changing the point in the event lifecycle where ignoreSpans is applied.

closes #17451

@Lms24 Lms24 self-assigned this Sep 18, 2025
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.22 kB - -
@sentry/browser - with treeshaking flags 22.74 kB - -
@sentry/browser (incl. Tracing) 40.26 kB +0.08% +30 B 🔺
@sentry/browser (incl. Tracing, Replay) 78.63 kB +0.05% +34 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.29 kB +0.04% +26 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 83.29 kB +0.04% +32 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 95.52 kB +0.04% +32 B 🔺
@sentry/browser (incl. Feedback) 40.94 kB - -
@sentry/browser (incl. sendFeedback) 28.88 kB - -
@sentry/browser (incl. FeedbackAsync) 33.78 kB - -
@sentry/react 25.93 kB - -
@sentry/react (incl. Tracing) 42.26 kB +0.07% +29 B 🔺
@sentry/vue 28.71 kB - -
@sentry/vue (incl. Tracing) 42.07 kB +0.07% +28 B 🔺
@sentry/svelte 24.24 kB - -
CDN Bundle 25.75 kB - -
CDN Bundle (incl. Tracing) 40.07 kB +0.05% +19 B 🔺
CDN Bundle (incl. Tracing, Replay) 76.3 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 81.8 kB +0.02% +16 B 🔺
CDN Bundle - uncompressed 75.23 kB - -
CDN Bundle (incl. Tracing) - uncompressed 118.65 kB +0.06% +68 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 233.78 kB +0.03% +68 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 246.54 kB +0.03% +68 B 🔺
@sentry/nextjs (client) 44.26 kB +0.08% +32 B 🔺
@sentry/sveltekit (client) 40.69 kB +0.07% +28 B 🔺
@sentry/node-core 49.96 kB -0.01% -1 B 🔽
@sentry/node 151.25 kB - -
@sentry/node - without tracing 91.87 kB - -
@sentry/aws-serverless 105.31 kB - -

View base workflow run

@Lms24 Lms24 requested review from a team, AbhiPrasad and andreiborza and removed request for a team September 18, 2025 17:02
@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,071 - 8,870 +2%
GET With Sentry 1,398 15% 1,378 +1%
GET With Sentry (error only) 6,169 68% 5,946 +4%
POST Baseline 1,210 - 1,176 +3%
POST With Sentry 541 45% 492 +10%
POST With Sentry (error only) 1,082 89% 988 +10%
MYSQL Baseline 3,372 - 3,255 +4%
MYSQL With Sentry 498 15% 450 +11%
MYSQL With Sentry (error only) 2,736 81% 2,620 +4%

View base workflow run

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

nice, I like the pragmatic solution ❤️ 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants