Title: Ensure we noop (NonRecordingSpan) in `Sentry.startSpanXXX` APIs when `hasSpansEnabled() === false` · Issue #17826 · getsentry/sentry-javascript · GitHub
Open Graph Title: Ensure we noop (NonRecordingSpan) in `Sentry.startSpanXXX` APIs when `hasSpansEnabled() === false` · Issue #17826 · getsentry/sentry-javascript
X Title: Ensure we noop (NonRecordingSpan) in `Sentry.startSpanXXX` APIs when `hasSpansEnabled() === false` · Issue #17826 · getsentry/sentry-javascript
Description: Description Today, if you do not enable tracing in Sentry at all, but use a custom OTEL setup, any calls of Sentry.startSpan() will emit spans into your custom otel setup. While for users this is likely not super relevant, there is alway...
Open Graph Description: Description Today, if you do not enable tracing in Sentry at all, but use a custom OTEL setup, any calls of Sentry.startSpan() will emit spans into your custom otel setup. While for users this is l...
X Description: Description Today, if you do not enable tracing in Sentry at all, but use a custom OTEL setup, any calls of Sentry.startSpan() will emit spans into your custom otel setup. While for users this is l...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/17826
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ensure we noop (NonRecordingSpan) in `Sentry.startSpanXXX` APIs when `hasSpansEnabled() === false`","articleBody":"### Description\n\nToday, if you do not enable tracing in Sentry at all, but use a custom OTEL setup, any calls of `Sentry.startSpan()` will emit spans into your custom otel setup.\n\nWhile for users this is likely not super relevant, there is always the possibility for calls to our span APIs in our own code to leak like this, which is not really expected. So to avoid this, we should likely ensure to return a non recording span instead in these cases and not actually record a span.\n\nNOTE: We should not use `suppressTracing()` for this as this would also suppress tracing inside of the callback. We may use suppress tracing in a nested way (?) possibly, but this could become a bit tricky:\n\n```js\nconst wasSuppressed = isTracingSuppressed(ctx);\nconst newCtx = wasSuppressed ? ctx : suppressTracing(ctx);\nreturn context.with(newCtx, () => {\n return tracer.startSpan(..., () => {\n return context.with(ctx, () => {\n return callback();\n })\n})\n```\n\nsomething along these lines!","author":{"url":"https://github.com/mydea","@type":"Person","name":"mydea"},"datePublished":"2025-09-30T08:55:49Z","url":"https://github.com/getsentry/sentry-javascript/issues/17826"}
| 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:07cf740e-c3dc-e6ce-f4fa-a9180bf5f32e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A3C2:2B774B:A93A90:ED66FE:6B042FDB |
| html-safe-nonce | 090c71009982af1a7f6ae400b570a0229c22e650981284adc943f6c55ab9077d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0MyOjJCNzc0QjpBOTNBOTA6RUQ2NkZFOjZCMDQyRkRCIiwidmlzaXRvcl9pZCI6IjI1NTcyOTM1MjkyMTA4MjY3MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fd70e5fc842adea09bc8153c48cc9689bc0936dfa48141154240e32101bfa7f6 |
| hovercard-subject-tag | issue:3468265887 |
| 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/17826/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3729806e98c32fd575446d85467e74ccbc7a12d5119d3b53cc231119ab659897/getsentry/sentry-javascript/issues/17826 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3729806e98c32fd575446d85467e74ccbc7a12d5119d3b53cc231119ab659897/getsentry/sentry-javascript/issues/17826 |
| og:image:alt | Description Today, if you do not enable tracing in Sentry at all, but use a custom OTEL setup, any calls of Sentry.startSpan() will emit spans into your custom otel setup. While for users this is l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mydea |
| 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