Title: Split `browserTracingIntegration` into standalone, tree-shakeable integrations · Issue #26253 · getsentry/sentry-javascript · GitHub
Open Graph Title: Split `browserTracingIntegration` into standalone, tree-shakeable integrations · Issue #26253 · getsentry/sentry-javascript
X Title: Split `browserTracingIntegration` into standalone, tree-shakeable integrations · Issue #26253 · getsentry/sentry-javascript
Description: browserTracingIntegration() has several features that are on by default but only gated at runtime, so bundlers can't drop them. #26134, #26137, #26141 and #26143 tried to fix this with build flags. We closed them because flags have their...
Open Graph Description: browserTracingIntegration() has several features that are on by default but only gated at runtime, so bundlers can't drop them. #26134, #26137, #26141 and #26143 tried to fix this with build flags....
X Description: browserTracingIntegration() has several features that are on by default but only gated at runtime, so bundlers can't drop them. #26134, #26137, #26141 and #26143 tried to fix this with build fl...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/26253
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Split `browserTracingIntegration` into standalone, tree-shakeable integrations","articleBody":"`browserTracingIntegration()` has several features that are on by default but only gated at runtime, so bundlers can't drop them.\n\n[#26134](https://github.com/getsentry/sentry-javascript/pull/26134), [#26137](https://github.com/getsentry/sentry-javascript/pull/26137), [#26141](https://github.com/getsentry/sentry-javascript/pull/26141) and [#26143](https://github.com/getsentry/sentry-javascript/pull/26143) tried to fix this with build flags. We closed them because flags have their own costs:\n\n- We need to document them and add them to every bundler plugin.\n- They become a public API and thus must be maintained.\n- If we never document them and keep them a \"secret\" API, then every user pays those extra check bytes with no reason or way to set them.\n\nInstead, we can split `browserTracingIntegration` into more integrations that it loads by default, like we did with `webVitalsIntegration` and several timing integrations. The default stays the same, and users who care about size can skip `browserTracingIntegration` and import only the parts they need.\n\nFeatures from those PRs to cover:\n\n- XHR request instrumentation ([#26134](https://github.com/getsentry/sentry-javascript/pull/26134)), for fetch-only apps\n- Linked traces ([#26137](https://github.com/getsentry/sentry-javascript/pull/26137)). An early return inside `linkTraces` only saved ~600 B, so the split needs to happen at the call site.\n- Long task and LoAF tracking ([#26141](https://github.com/getsentry/sentry-javascript/pull/26141)). They're alternatives in the same `if/else`, so one integration covering both makes sense.\n- Span error handlers, HTTP timings and background tab detection ([#26143](https://github.com/getsentry/sentry-javascript/pull/26143))\n","author":{"url":"https://github.com/logaretm","@type":"Person","name":"logaretm"},"datePublished":"2026-11-10T15:58:56Z","url":"https://github.com/getsentry/sentry-javascript/issues/26253"}
| 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:06886e62-0bbb-b424-7796-21b1c454460a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF2E:35E323:D19EAB:126446E:6B043F97 |
| html-safe-nonce | f94ca99c3956c0c996f87650608f937eb5c268885ab981b543a2f0070efb1768 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjJFOjM1RTMyMzpEMTlFQUI6MTI2NDQ2RTo2QjA0M0Y5NyIsInZpc2l0b3JfaWQiOiIyNzM0NTE0NDkyNzA3OTc5MTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9769107a0b3eef8de8ead3248c618b0055f8d2dcca3b2162f587ccdae7030aac |
| hovercard-subject-tag | issue:6310583763 |
| 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/26253/issue_layout |
| twitter:image | https://opengraph.githubassets.com/08d849fc3d727ce1b2161050c1be04b35c8326e0e90d8e2cfc5b4f1459862b81/getsentry/sentry-javascript/issues/26253 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/08d849fc3d727ce1b2161050c1be04b35c8326e0e90d8e2cfc5b4f1459862b81/getsentry/sentry-javascript/issues/26253 |
| og:image:alt | browserTracingIntegration() has several features that are on by default but only gated at runtime, so bundlers can't drop them. #26134, #26137, #26141 and #26143 tried to fix this with build flags.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | logaretm |
| 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