Title: ref(tracing): Split `@sentry/tracing` into runtime specific packages · Issue #5815 · getsentry/sentry-javascript · GitHub
Open Graph Title: ref(tracing): Split `@sentry/tracing` into runtime specific packages · Issue #5815 · getsentry/sentry-javascript
X Title: ref(tracing): Split `@sentry/tracing` into runtime specific packages · Issue #5815 · getsentry/sentry-javascript
Description: Problem Statement After some discussions around supporting newer JavaScript runtimes (#5611) @lforst pointed out the first thing that needs tackling is @sentry/tracing! This package currently contains: Runtime agnostic code used to add t...
Open Graph Description: Problem Statement After some discussions around supporting newer JavaScript runtimes (#5611) @lforst pointed out the first thing that needs tackling is @sentry/tracing! This package currently conta...
X Description: Problem Statement After some discussions around supporting newer JavaScript runtimes (#5611) @lforst pointed out the first thing that needs tackling is @sentry/tracing! This package currently conta...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5815
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ref(tracing): Split `@sentry/tracing` into runtime specific packages","articleBody":"### Problem Statement\n\nAfter some discussions around supporting newer JavaScript runtimes (#5611) @lforst pointed out the first thing that needs tackling is `@sentry/tracing`! \n\nThis package currently contains:\n- Runtime agnostic code used to add transaction support to the hub\n- Browser specific instrumentation code\n- Node.js specific instrumentation code \n\n#### Goal: Remove the tracing package, move stuff into core/browser/node\n\n### Solution Brainstorm\n\nIt looks like the runtime agnostic code can safely be moved to `@sentry/core` without affecting bundle sizes since if it goes unused it gets tree-shaken.\n\nThe runtime specific code could be moved into [package exports](https://webpack.js.org/guides/package-exports/) under the specific runtime, ie. `@sentry/browser/tracing` and `@sentry/node/tracing`. We've [been using this in the Electron SDK](https://github.com/getsentry/sentry-electron/blob/aaf65dbb49735c662adbd45dcc618ba45bc8004d/package.json#L8-L25) for a while to keep bundlers happy with the two different contexts we run in. We can't export the tracing code at the root of the packages since importing tracing has side-effects! \n\nI haven't marked this issue as `Breaking` yet because I think it would be possible to move this code while keeping `@sentry/tracing` as a stub that would simply re-export the moved code. `@sentry/tracing` would have to depend on both `@sentry/browser` and `@sentry/node` so I'm not sure how viable this is yet or if it's worth that extra step 🤔\n\n\n```[tasklist]\n### Tasks\n- [ ] https://github.com/getsentry/sentry-javascript/issues/7091\n- [ ] https://github.com/getsentry/sentry-javascript/pull/7345\n- [ ] https://github.com/getsentry/sentry-javascript/issues/7342\n- [ ] https://github.com/getsentry/sentry-javascript/issues/7346\n- [ ] https://github.com/getsentry/sentry-javascript/issues/7340\n```\n\n```[tasklist]\n### Cleanup\n- [ ] https://github.com/getsentry/sentry-docs/issues/6518\n- [ ] https://github.com/getsentry/sentry-javascript/issues/7586\n```","author":{"url":"https://github.com/timfish","@type":"Person","name":"timfish"},"datePublished":"2022-09-26T11:03:24Z","url":"https://github.com/getsentry/sentry-javascript/issues/5815"}
| 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:d843c810-4a6c-bd64-5437-0b623b95d93b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8692:1FAF:FD37F4:15140D1:6B040ECF |
| html-safe-nonce | 6e15970f32c446fd50affaf6b0c866508943597094c1b713750b1c61cf660cb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjkyOjFGQUY6RkQzN0Y0OjE1MTQwRDE6NkIwNDBFQ0YiLCJ2aXNpdG9yX2lkIjoiNjE5MjM5MDY4MjczNzY0MzIxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 79322e6ae2df3afc3ccd79d06d317d10b457239362bd62af8e58ccd91f31fc6f |
| hovercard-subject-tag | issue:1385868578 |
| 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/5815/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bec5e17dd01a6b163b8f65d149135a4747c13c40f11461ef49f6b76a0da949c0/getsentry/sentry-javascript/issues/5815 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bec5e17dd01a6b163b8f65d149135a4747c13c40f11461ef49f6b76a0da949c0/getsentry/sentry-javascript/issues/5815 |
| og:image:alt | Problem Statement After some discussions around supporting newer JavaScript runtimes (#5611) @lforst pointed out the first thing that needs tackling is @sentry/tracing! This package currently conta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timfish |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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