Skip to content

fix(nuxt): Stop flushing the client on every HTTP response - #23312

Merged
logaretm merged 1 commit into
developfrom
awad/nuxt-flush-client-report-per-response
Aug 12, 2026
Merged

fix(nuxt): Stop flushing the client on every HTTP response#23312
logaretm merged 1 commit into
developfrom
awad/nuxt-flush-client-report-per-response

Conversation

@logaretm

@logaretmlogaretm commented Aug 11, 2026

Copy link
Copy Markdown
Member

Stops the Nuxt server SDK from flushing on every HTTP response, which shipped a client_report envelope per request instead of aggregating outcomes on the flush interval.

Swaps the eager vercelWaitUntil(flushSafelyWithTimeout()) for flushIfServerless(), so serverless still flushes eagerly while a long-running server is a no-op.

closes#23306

The http `responseHook` called `vercelWaitUntil(flushSafelyWithTimeout())`, which
evaluates the flush eagerly regardless of platform. On a long-running server this ran
`flush()` on every HTTP response, shipping each pending outcome as its own
`client_report` envelope instead of aggregating it on the flush interval.
Use `flushIfServerless()` instead, which only flushes on serverless platforms and is a
no-op on a long-running server.
@logaretm

Copy link
Copy Markdown
MemberAuthor

bugbot run

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser30.29 kB--
@sentry/browser - with treeshaking flags28.47 kB--
@sentry/browser - with treeshaking flags tracing without tracing26.8 kB--
@sentry/browser (incl. Tracing)48.54 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.56 kB--
@sentry/browser (incl. Tracing, Profiling)51.44 kB--
@sentry/browser (incl. Tracing, Replay)87.95 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags77.36 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)92.66 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)105.36 kB--
@sentry/browser (incl. Feedback)47.61 kB--
@sentry/browser (incl. sendFeedback)35.11 kB--
@sentry/browser (incl. FeedbackAsync)40.26 kB--
@sentry/browser (incl. Metrics)31.28 kB--
@sentry/browser (incl. Logs)31.53 kB--
@sentry/browser (incl. Metrics & Logs)32.2 kB--
@sentry/react32.09 kB--
@sentry/react (incl. Tracing)50.73 kB--
@sentry/vue35.34 kB--
@sentry/vue (incl. Tracing)50.5 kB--
@sentry/svelte30.31 kB--
CDN Bundle31.59 kB--
CDN Bundle (incl. Tracing)48.87 kB--
CDN Bundle (incl. Logs, Metrics)33.8 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)50.83 kB--
CDN Bundle (incl. Replay, Logs, Metrics)74.34 kB--
CDN Bundle (incl. Tracing, Replay)86.46 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)88.33 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)92.17 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)94.14 kB--
CDN Bundle - uncompressed93.77 kB--
CDN Bundle (incl. Tracing) - uncompressed146.66 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed100.17 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed152.46 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed229.1 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed265.92 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed271.7 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed279.61 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed285.38 kB--
@sentry/nextjs (client)53.29 kB--
@sentry/sveltekit (client)48.96 kB--
@sentry/core/server65.44 kB--
@sentry/core/browser51.8 kB--
@sentry/node117.98 kB-0.01%-1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection)0 Baddedadded
@sentry/node - without tracing82.09 kB--
@sentry/aws-serverless91.5 kB-0.01%-1 B 🔽
@sentry/cloudflare (withSentry) - minified214.1 kB--
@sentry/cloudflare (withSentry)528.64 kB--

View base workflow run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit aa346be. Configure here.

@logaretm
logaretm marked this pull request as ready for review August 11, 2026 20:04
@logaretm
logaretm requested a review from a team as a code ownerAugust 11, 2026 20:04
@logaretm
logaretm requested review from mydea and s1gr1d and removed request for a teamAugust 11, 2026 20:04
@logaretm
logaretm merged commit 61e62be into developAug 12, 2026
51 checks passed
@logaretm
logaretm deleted the awad/nuxt-flush-client-report-per-response branch August 12, 2026 12:56
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.

@sentry/nuxt: responseHook flushes the client on every HTTP response, so every request ships its own client_report envelope

2 participants

@logaretm@s1gr1d