Title: Add trace id in Sentry Event when `tracesSampleRate` is set to 0 in Cloudflare · Issue #22214 · getsentry/sentry-javascript · GitHub
Open Graph Title: Add trace id in Sentry Event when `tracesSampleRate` is set to 0 in Cloudflare · Issue #22214 · getsentry/sentry-javascript
X Title: Add trace id in Sentry Event when `tracesSampleRate` is set to 0 in Cloudflare · Issue #22214 · getsentry/sentry-javascript
Description: Problem Statement Edit: tracing is now officially added and fully functional: https://developers.cloudflare.com/changelog/post/2026-09-25-custom-span-apis/ A new option called Tracing has been added in Cloudflare Wrangler types v5: expor...
Open Graph Description: Problem Statement Edit: tracing is now officially added and fully functional: https://developers.cloudflare.com/changelog/post/2026-09-25-custom-span-apis/ A new option called Tracing has been adde...
X Description: Problem Statement Edit: tracing is now officially added and fully functional: https://developers.cloudflare.com/changelog/post/2026-09-25-custom-span-apis/ A new option called Tracing has been adde...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/22214
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add trace id in Sentry Event when `tracesSampleRate` is set to 0 in Cloudflare","articleBody":"### Problem Statement\n\nEdit: `tracing` is now officially added and fully functional: https://developers.cloudflare.com/changelog/post/2026-09-25-custom-span-apis/\n\nA new option called `Tracing` has been added in Cloudflare Wrangler types v5:\n\n```js\nexport interface Tracing {\n enterSpan\u003cT, A extends unknown[]>(\n name: string,\n callback: (span: Span, ...args: A) => T,\n ...args: A\n ): T;\n startActiveSpan\u003cT, A extends unknown[]>(\n name: string,\n callback: (span: Span, ...args: A) => T,\n ...args: A\n ): T;\n Span: typeof Span;\n}\nexport declare abstract class Span {\n get isTraced(): boolean;\n setAttribute(key: string, value?: boolean | number | string): void;\n end(): void;\n}\n```\n\nThis will be added when tracing has been enabled by the wrangler config. When `tracesSampleRate` is set to 0 the Error triggered from Sentry has no trace id. When there is a trace drain from Cloudflare to Sentry then this error won't be attached properly. It'd work when the Error/Event would have a trace id attached.\n\n### Solution Brainstorm\n\nBased on the the type there is no trace id, so let's see if there is any way to retrieve it, or only Tailworker have access to it (since they have a `SpanContext` attached in their type\n\n### Additional Context\n\n_No response_\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-07-13T08:28:05Z","url":"https://github.com/getsentry/sentry-javascript/issues/22214"}
| 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:18a3c4d9-5d9b-1e47-f452-06694aa9d1df |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7EA:681B3:8EA0DF:C8CE81:6B045547 |
| html-safe-nonce | f87d7566672f9ead6823b776332a2876dff2353bd4390871bb77399aef4c7768 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0VBOjY4MUIzOjhFQTBERjpDOENFODE6NkIwNDU1NDciLCJ2aXNpdG9yX2lkIjoiOTEwOTM1NjI5MDYyMjM3OTMzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 86cad265f200a75121b09e99e68c30cc2f12c2a7c583c348ef51d720091f0669 |
| hovercard-subject-tag | issue:4871818118 |
| 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/22214/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a86eb7fb7aa135d85d1eafc7041e92fb803fcd1ccf76c5bafa0e07ece282b69e/getsentry/sentry-javascript/issues/22214 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a86eb7fb7aa135d85d1eafc7041e92fb803fcd1ccf76c5bafa0e07ece282b69e/getsentry/sentry-javascript/issues/22214 |
| og:image:alt | Problem Statement Edit: tracing is now officially added and fully functional: https://developers.cloudflare.com/changelog/post/2026-09-25-custom-span-apis/ A new option called Tracing has been adde... |
| 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 | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| 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 | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| 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