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
Cloudflare capture crashes / data before we export the default fetch handler #24375
Potentially the following Error would never be seen within Sentry:
// file:src/index.tsimportdiagnostics_channelfrom'diagnostics_channel';constchannel=diagnostics_channel.channel('my-channel');constapp=newHono();// never been seen by SentrythrownewError();// never been seen by Sentrychannel.publish({some: 'data',});exportdefault{fetch: app.fetch,scheduled: async(batch,env)=>{},}
Solution Brainstorm
Since we introduced cachedClients #23151 we could potentially inject an Sentry.init at the top of the workers entrypoint with Vite:
// file:src/index.ts// following is being injected automatically and uses `Sentry.init`import./instrument.js`;// ... the rest from above ...
Theoretically, instrument.js only sets up the client so we receive some data, and later the withSentry wrapped code would wrap everything as usual and reuses the previously created client.
Additional Context
This would only work with the v11's default cacheClient: true and the entrypoint would not be added when cacheClient: false
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Activity
linear-code commentedon Sep 14, 2026
JS-3677