Title: Improve `ignoreSpans` behaviour in Browser SDKs · Issue #17451 · getsentry/sentry-javascript · GitHub
Open Graph Title: Improve `ignoreSpans` behaviour in Browser SDKs · Issue #17451 · getsentry/sentry-javascript
X Title: Improve `ignoreSpans` behaviour in Browser SDKs · Issue #17451 · getsentry/sentry-javascript
Description: Description The initial implementation of ignoreSpans retroactively, at event processing time, removes spans matching the filter criteria from the trace and re-parents existing spans. While this works reasonably well in server SDKs, wher...
Open Graph Description: Description The initial implementation of ignoreSpans retroactively, at event processing time, removes spans matching the filter criteria from the trace and re-parents existing spans. While this wo...
X Description: Description The initial implementation of ignoreSpans retroactively, at event processing time, removes spans matching the filter criteria from the trace and re-parents existing spans. While this wo...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/17451
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve `ignoreSpans` behaviour in Browser SDKs","articleBody":"### Description\n\nThe initial implementation of `ignoreSpans` retroactively, at event processing time, removes spans matching the filter criteria from the trace and re-parents existing spans. While this works reasonably well in server SDKs, where the root span always has a defined start and end point, it doesn't work well in browser sdks. \n\nThis is because the root spans created from our browser SDKs (`pageload` and `navigation` spans) are almost exclusively idle spans, meaning they have a defined start point but their end point is debounced until no more child spans are added (with a couple of timeout options to keep things at bay of course). \n\nThis leads to the problem that if we filter out spans via `ignoreSpans` that initially prolonged the `pageload` (et al.) root span, the root span appears way longer in duration than the remaining child spans. This effectively makes the root span duration even more unactionable than it is already.\n\nShort-term, we have 2 possibilities to improve this:\n\n1. Apply `ignoreSpans` prior to starting any span. This would be logical but is only possible in browser-land. Meaning, the behaviour of this option would significantly differ between browser and Node/OTel-based SDKs.\n2. Apply another round of idle span end timestamp adjustment at at post-event-processing time. We already adjust the end time of the idle span to the longest running child span but we'd need to do another pass of this adjustment after applying `ignoreSpans` where we currently do it.\n\nI'm kinda leaning towards 1 for now, mainly because we can but equally unhappy to go with either option.","author":{"url":"https://github.com/Lms24","@type":"Person","name":"Lms24"},"datePublished":"2025-08-25T15:29:44Z","url":"https://github.com/getsentry/sentry-javascript/issues/17451"}
| 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:0ad2ab36-3e77-b949-3a1a-8abdaa6ff2a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC64:3F9CD1:1E03355:27063D2:6B052D92 |
| html-safe-nonce | 2c94bee56bc7fdadbfbbae1b9bb647a580ebf1e24032837f217a937f5da7a710 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzY0OjNGOUNEMToxRTAzMzU1OjI3MDYzRDI6NkIwNTJEOTIiLCJ2aXNpdG9yX2lkIjoiNjEzMzUwMDc0MTE2OTc4NjI1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2743771f9cfcf87e46a4093b5b7dd84d2aa4a0199057315dc8165b06c4b7f4cf |
| hovercard-subject-tag | issue:3352291292 |
| 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/17451/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa220c0048fa15b7d349729412761205eaf4d391f2793ad564d9cae59f54c41b/getsentry/sentry-javascript/issues/17451 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa220c0048fa15b7d349729412761205eaf4d391f2793ad564d9cae59f54c41b/getsentry/sentry-javascript/issues/17451 |
| og:image:alt | Description The initial implementation of ignoreSpans retroactively, at event processing time, removes spans matching the filter criteria from the trace and re-parents existing spans. While this wo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lms24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| 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 | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| 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