Title: @sentry/cloudflare not reporting errors thrown from Durable Objects · Issue #16786 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/cloudflare not reporting errors thrown from Durable Objects · Issue #16786 · getsentry/sentry-javascript
X Title: @sentry/cloudflare not reporting errors thrown from Durable Objects · Issue #16786 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/16786
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/cloudflare not reporting errors thrown from Durable Objects","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/cloudflare\n\n### SDK Version\n\n9.34.0\n\n### Framework Version\n\n9.34.0\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```typescript\nimport { DurableObject } from \"cloudflare:workers\";\nimport * as Sentry from \"@sentry/cloudflare\";\n\nclass MyDurableObjectBase extends DurableObject\u003cEnv> {\n\tconstructor(ctx: DurableObjectState, env: Env) {\n\t\tsuper(ctx, env);\n\t}\n\n\tasync sayHello(name: string): Promise\u003cstring> {\n\t\tthrow new Error(\"Should be recorded in Sentry.\")\n\t}\n}\n\nexport const MyDurableObject = Sentry.instrumentDurableObjectWithSentry(\n\t(env: Env) => ({\n\t dsn: \"__YOUR_DSN__\",\n\t tracesSampleRate: 1.0,\n\t debug: true\n\t}),\n\tMyDurableObjectBase,\n);\n\nexport default {\n\tasync fetch(request, env, ctx): Promise\u003cResponse> {\n\t\tconst id: DurableObjectId = env.MY_DURABLE_OBJECT.idFromName(\"foo\");\n\n\t\tconst stub = env.MY_DURABLE_OBJECT.get(id);\n\n\t\tconst greeting = await stub.sayHello(\"world\");\n\n\t\treturn new Response(greeting);\n\t},\n} satisfies ExportedHandler\u003cEnv>;\n```\n\n### Steps to Reproduce\n\n1. Send fetch request to a worker instrumented with `Sentry.instrumentDurableObjectWithSentry` where the Durable Object RPC method throws when called by the worker. (see example above)\n2. No Sentry logs (console) / errors are recorded.\n\n### Expected Result\n\nSentry should record errors thrown according to the [docs](https://docs.sentry.io/platforms/javascript/guides/cloudflare/features/durableobject/)\n\nAdditionally, since `debug: true` is set, there should be debug logs from the Sentry library.\n\n### Actual Result\n\n\u003cimg width=\"348\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b8394cd6-5972-4f2d-840b-f66119138ab3\" />\n\nNo debug logs visible, no errors reported to Sentry.","author":{"url":"https://github.com/jczstudios","@type":"Person","name":"jczstudios"},"datePublished":"2025-07-02T00:01:31Z","url":"https://github.com/getsentry/sentry-javascript/issues/16786"}
| 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:09cb8dde-673a-673f-cccb-6a09e838d704 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9456:3A99B3:78C4A:A2027:6B058F92 |
| html-safe-nonce | 0d1cd977be6368720139c81624a0bca0a064b99752120a036fab8ba0e65b9767 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDU2OjNBOTlCMzo3OEM0QTpBMjAyNzo2QjA1OEY5MiIsInZpc2l0b3JfaWQiOiI0NzgyOTIzNzAzNDM0NzEwOTMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bc6c192774b41bc39acfa0cc9497a1471c2e68923e95ab634fc4b81f6afbf505 |
| hovercard-subject-tag | issue:3194117917 |
| 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/16786/issue_layout |
| twitter:image | https://opengraph.githubassets.com/92d7227fadb4978ff3c759c7b0171cc0615e8956d99e9f4c32fa08160c320454/getsentry/sentry-javascript/issues/16786 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/92d7227fadb4978ff3c759c7b0171cc0615e8956d99e9f4c32fa08160c320454/getsentry/sentry-javascript/issues/16786 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jczstudios |
| hostname | github.com |
| expected-hostname | github.com |
| None | 808d57ad26095794a9e3681aed736bd67e8e82b1f5650d6c1e68f99382f8030c |
| 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 | 62e32c52ec1c22b5bb5c18be1c0c471472c89540 |
| 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