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
fix(cloudflare, vercel-edge): Disable timer-based flush for serverless runtimes
The weight-based flushing mechanism for logs and metrics schedules a
`setTimeout(fn, 5000)` after each capture. In Cloudflare Workers built
with `@cloudflare/vite-plugin` (native ESM + `no_bundle: true`), workerd
rejects this timer as running outside request context.
Add a `_flushInterval` internal option to `ClientOptions`. When set to 0,
the idle flush timer is skipped entirely. Size-based flushing (800KB) and
explicit `flush()` calls (via `withSentry` → `flushAndDispose`) still work.
Set `_flushInterval: 0` in `CloudflareClient` and `VercelEdgeClient`.
Fixes#20888
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments