Skip to content

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Oct 2, 2025

This PR fixes a case where we [correctly] tag an error event w/ replay id, but something occurs where the replay event does not end up being flushed. This means the existing session is still in a buffered state, and will keep its session id until a new error event is sampled and a replay is created. When this does happen, we can have a replay with a super long duration (e.g. the time between the two error replays).

We now update the session immediately when we tag an error event w/ replay id so that if the replay event does not successfully flush, the session will respect its expiration date.

This PR fixes a case where we [correctly] tag an error event w/ replay id, but something occurs where the replay event does not end up being flushed. This means the existing session is still in a buffered state, and will keep its session id until a new error event is sampled and a replay is created. When this does happen, we can have a replay with a super long duration (e.g. the time between the two error replays).

We now update the session immediately when we tag an error event w/ replay id so that if the replay event does not successfully flush, the session will respect its expiration date.
Copy link

linear bot commented Oct 2, 2025

Copy link
Contributor

github-actions bot commented Oct 2, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.26 kB - -
@sentry/browser - with treeshaking flags 22.77 kB - -
@sentry/browser (incl. Tracing) 40.45 kB - -
@sentry/browser (incl. Tracing, Replay) 78.87 kB +0.06% +42 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.52 kB +0.07% +45 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 83.54 kB +0.06% +43 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 95.74 kB +0.05% +44 B 🔺
@sentry/browser (incl. Feedback) 40.97 kB - -
@sentry/browser (incl. sendFeedback) 28.91 kB - -
@sentry/browser (incl. FeedbackAsync) 33.84 kB -0.01% -1 B 🔽
@sentry/react 25.98 kB - -
@sentry/react (incl. Tracing) 42.42 kB -0.01% -1 B 🔽
@sentry/vue 28.77 kB - -
@sentry/vue (incl. Tracing) 42.26 kB - -
@sentry/svelte 24.29 kB - -
CDN Bundle 25.77 kB - -
CDN Bundle (incl. Tracing) 40.33 kB - -
CDN Bundle (incl. Tracing, Replay) 76.62 kB +0.06% +39 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 82.12 kB +0.05% +36 B 🔺
CDN Bundle - uncompressed 75.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 119.36 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 234.7 kB +0.08% +181 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 247.47 kB +0.08% +181 B 🔺
@sentry/nextjs (client) 44.42 kB +0.01% +1 B 🔺
@sentry/sveltekit (client) 40.87 kB - -
@sentry/node-core 50.56 kB - -
@sentry/node 154.19 kB - -
@sentry/node - without tracing 92.42 kB +0.01% +1 B 🔺
@sentry/aws-serverless 106.14 kB - -

View base workflow run

Copy link
Contributor

github-actions bot commented Oct 7, 2025

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 8,862 - 8,994 -1%
GET With Sentry 1,421 16% 1,430 -1%
GET With Sentry (error only) 6,263 71% 6,248 +0%
POST Baseline 1,233 - 1,205 +2%
POST With Sentry 528 43% 555 -5%
POST With Sentry (error only) 1,079 88% 1,068 +1%
MYSQL Baseline 3,370 - 3,329 +1%
MYSQL With Sentry 530 16% 505 +5%
MYSQL With Sentry (error only) 2,750 82% 2,716 +1%

View base workflow run

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.

1 participant