You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Telemetry is delayed or lost when Vercel suspends a Node.js function after the response #24909
Seen with Next.js 16 on the Vercel Node.js runtime. The cause is not specific to Next.js.
Link to Sentry event
No response
Reproduction Example/SDK Setup
Default server setup:
Sentry.init({dsn: '...',tracesSampleRate: 1,});
Steps to Reproduce
Deploy an app that uses the Node.js SDK to Vercel, on the Node.js runtime.
Send one request.
Send no more requests, so the function goes idle.
Look for the request's telemetry in Sentry.
Expected Result
All telemetry of the request (spans, logs, metrics, errors) arrives shortly after the response.
Actual Result
Telemetry that was still buffered when the response was sent arrives late or never. It is sent only when a later request wakes the same instance. With span streaming, the root span of the last request is often missing and its child spans show up without a parent.
Additional Context
Vercel can suspend a function as soon as it sends the response. The SDK sends buffered telemetry on timers or on SIGTERM, and neither runs while the function is suspended.
Vercel provides waitUntil through Symbol.for('@vercel/request-context') on the Node.js runtime, but the SDK uses it only on the Edge runtime.
Wondering if this just concerns span streaming or also logs, metrics or anything else that doesn't send immediately. Or IOW where we should actually make that flush call.
changed the title [-]Span streaming drops the root span on Vercel Node.js runtime (Fluid compute)[/-][+]Telemetry is delayed or lost when Vercel suspends a Node.js function after the response[/+]on Oct 1, 2026
Activity
linear-code commentedon Sep 30, 2026
JS-3859
Lms24 commentedon Oct 1, 2026
Wondering if this just concerns span streaming or also logs, metrics or anything else that doesn't send immediately. Or IOW where we should actually make that flush call.
fix(node): Flush telemetry before Vercel functions are suspended
[-]Span streaming drops the root span on Vercel Node.js runtime (Fluid compute)[/-][+]Telemetry is delayed or lost when Vercel suspends a Node.js function after the response[/+]sergical commentedon Oct 1, 2026
@Lms24 thank you for encouraging to look at it holistically, updated the context, let me know if anything is unclear
Lms24 commentedon Oct 2, 2026
thx, left a quick review but need more eyes on the fix. Nice idea with the diagnostic channel!
fix(node): Flush telemetry before Vercel functions are suspended (get…
github-actions commentedon Oct 7, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #24910, which was included in the 11.5.0 release.