Title: Cloudflare capture crashes / data before we export the default fetch handler · Issue #24375 · getsentry/sentry-javascript · GitHub
Open Graph Title: Cloudflare capture crashes / data before we export the default fetch handler · Issue #24375 · getsentry/sentry-javascript
X Title: Cloudflare capture crashes / data before we export the default fetch handler · Issue #24375 · getsentry/sentry-javascript
Description: Problem Statement Potentially the following Error would never be seen within Sentry: // file:src/index.ts import diagnostics_channel from 'diagnostics_channel'; const channel = diagnostics_channel.channel('my-channel'); const app = new H...
Open Graph Description: Problem Statement Potentially the following Error would never be seen within Sentry: // file:src/index.ts import diagnostics_channel from 'diagnostics_channel'; const channel = diagnostics_channel....
X Description: Problem Statement Potentially the following Error would never be seen within Sentry: // file:src/index.ts import diagnostics_channel from 'diagnostics_channel'; const channel = diagnostics_...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24375
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cloudflare capture crashes / data before we export the default fetch handler","articleBody":"### Problem Statement\n\nPotentially the following Error would never be seen within Sentry:\n\n```js\n// file:src/index.ts\n\nimport diagnostics_channel from 'diagnostics_channel';\n\nconst channel = diagnostics_channel.channel('my-channel');\nconst app = new Hono();\n\n// never been seen by Sentry\nthrow new Error();\n\n// never been seen by Sentry\nchannel.publish({\n some: 'data',\n});\n\nexport default {\n fetch: app.fetch,\n scheduled: async (batch, env) => {},\n}\n```\n\n### Solution Brainstorm\n\nSince we introduced cachedClients #23151 we could potentially inject an `Sentry.init` at the top of the workers entrypoint with Vite:\n\n```js\n// file:src/index.ts\n\n// following is being injected automatically and uses `Sentry.init`\nimport ./instrument.js`;\n\n// ... the rest from above ...\n```\n\nTheoretically, `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. \n\n### Additional Context\n\nThis would only work with the v11's default `cacheClient: true` and the entrypoint would not be added when `cacheClient: false`\n\n### Priority\n\n\u003csub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>","author":{"url":"https://github.com/JPeer264","@type":"Person","name":"JPeer264"},"datePublished":"2026-09-14T12:47:34Z","url":"https://github.com/getsentry/sentry-javascript/issues/24375"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06b5fa8f-bcc4-096d-76f2-9d41cecf86b9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D002:1BA0DD:5BAD3:80293:6B042A00 |
| html-safe-nonce | e751e2c7c896222462f7bb60812d4bf5aa99a35f096bd78dfe793dd9241b1310 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDAyOjFCQTBERDo1QkFEMzo4MDI5Mzo2QjA0MkEwMCIsInZpc2l0b3JfaWQiOiI1OTYyMDg0NjEwNjU2NzA5MTIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9a5078c82d63e637b543e5914b7dfb8ce45751c2929494387df396b764ef51cb |
| hovercard-subject-tag | issue:5449508987 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/24375/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a4e8b2501af5210b2450827d91a35d5b1758db6579397efd71c21d1c9b43dd55/getsentry/sentry-javascript/issues/24375 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a4e8b2501af5210b2450827d91a35d5b1758db6579397efd71c21d1c9b43dd55/getsentry/sentry-javascript/issues/24375 |
| og:image:alt | Problem Statement Potentially the following Error would never be seen within Sentry: // file:src/index.ts import diagnostics_channel from 'diagnostics_channel'; const channel = diagnostics_channel.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JPeer264 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width