-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
Initially reported by @tristanbes in this issue
I just had an outage on my production because of this. I am, as i'm typing this message, deleting all server side integration with sentry that I followed from your docs.
Cannot call this AsyncLocalStorage bound function outside of the request in which it was created.Environment:
- Next.js: 15.5.9
- @opennextjs/cloudflare: 1.14.8
- @sentry/nextjs: 10.33.0
- Deployment: Cloudflare Workers
- Cloudflare Workers compatibility_date: 2025-11-17
- Cloudflare compatibility_flags: nodejs_compat, global_fetch_strictly_public
Symptoms encountered:
AsyncLocalStorageerrors when usingSentry.captureRequestErrorin theonRequestErrorhook (maybe withaddBreadcrumbtoo)- Server-side Sentry initialization causes silent failures or "Server failed to respond" errors
Current workaround:
I've removed all server-side Sentry integration (deletedsentry.server.config.tsandsentry.edge.config.ts) and only kept client-side error tracking viainstrumentation-client.ts. Client-side Sentry works fine.The
withSentryConfigwrapper innext.config.tsstill works for source map uploads and the/monitoringtunnel route.Is there an ETA for OpenNext/Cloudflare Workers support? Would love to have full-stack observability back. Happy to help test any beta/canary versions.
I haven't reproduced it yet, but it might be related to #18700