Title: [cloudflare] expose async.setAsyncLocalStorageAsyncContextStrategy() · Issue #15342 · getsentry/sentry-javascript · GitHub
Open Graph Title: [cloudflare] expose async.setAsyncLocalStorageAsyncContextStrategy() · Issue #15342 · getsentry/sentry-javascript
X Title: [cloudflare] expose async.setAsyncLocalStorageAsyncContextStrategy() · Issue #15342 · getsentry/sentry-javascript
Description: Problem Statement It's great you now have official support for cloudflare! But it does not work with Durable Objects, only simple Cloudflare workers. The way the plugin was written assumes that all cloudflare workers export a Handler. Th...
Open Graph Description: Problem Statement It's great you now have official support for cloudflare! But it does not work with Durable Objects, only simple Cloudflare workers. The way the plugin was written assumes that all...
X Description: Problem Statement It's great you now have official support for cloudflare! But it does not work with Durable Objects, only simple Cloudflare workers. The way the plugin was written assumes that...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/15342
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[cloudflare] expose async.setAsyncLocalStorageAsyncContextStrategy()","articleBody":"### Problem Statement\n\nIt's great you now have official support for cloudflare! But it does not work with Durable Objects, only simple Cloudflare workers. \n\nThe way the plugin was written ass[umes that all cloudflare workers export a Handler](https://github.com/getsentry/sentry-javascript/blob/725a548be80651dd6b737e23be1a01dd930c9b34/packages/cloudflare/src/handler.ts#L37). This is an incorrect assumption; Durable Objects do not. As a result, we cannot call `withSentry()`, which means there is no way for us to call `setAsyncLocalStorageAsyncContextStrategy()` to set up the ALS store to get sentry to work.\n\n\n\n### Solution Brainstorm\n\nI suggest either exposing `setAsyncLocalStorageAsyncContextStrategy()` for us to call it ourselves, or introducing a helper function similar to `withSentry()` that is capable of instrumenting a DurableObject, which _does_ have a [`fetch()`](https://developers.cloudflare.com/durable-objects/api/base/#fetch) method, but not the way your SDK is written to assume it does. ","author":{"url":"https://github.com/aroman","@type":"Person","name":"aroman"},"datePublished":"2025-02-07T20:07:23Z","url":"https://github.com/getsentry/sentry-javascript/issues/15342"}
| 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:16a57a50-d0c4-7ac9-c8d9-f62755bd0619 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C22:BACBA:1960902:23341F4:6B043F80 |
| html-safe-nonce | 6e56a23fb121eca3af09e06d55f0738d7ecf870ac09cd61bb5f97b67ead4fecd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzIyOkJBQ0JBOjE5NjA5MDI6MjMzNDFGNDo2QjA0M0Y4MCIsInZpc2l0b3JfaWQiOiI1MjI4NjM0MDg5MTk1ODQ3NTUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3c5e6e9acbc21f3e843767746d843d252c9ceaafe4014e35f93169cc82e4d5f3 |
| hovercard-subject-tag | issue:2839000789 |
| 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/15342/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a0615742cc53613214c5bf7b1bc0d155c5e81b4dc7cb97e25de79526bbae9a2/getsentry/sentry-javascript/issues/15342 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a0615742cc53613214c5bf7b1bc0d155c5e81b4dc7cb97e25de79526bbae9a2/getsentry/sentry-javascript/issues/15342 |
| og:image:alt | Problem Statement It's great you now have official support for cloudflare! But it does not work with Durable Objects, only simple Cloudflare workers. The way the plugin was written assumes that all... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aroman |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| 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 | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| 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