Title: Sentry JavaScript v7 Major Release Plan · Issue #4240 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sentry JavaScript v7 Major Release Plan · Issue #4240 · getsentry/sentry-javascript
X Title: Sentry JavaScript v7 Major Release Plan · Issue #4240 · getsentry/sentry-javascript
Description: Update 3: We have released 🚀 https://github.com/getsentry/sentry-javascript/releases/tag/7.0.0 https://www.npmjs.com/package/@sentry/browser/v/7.0.0 https://www.npmjs.com/package/@sentry/node/v/7.0.0 Update 2: There are now beta releases...
Open Graph Description: Update 3: We have released 🚀 https://github.com/getsentry/sentry-javascript/releases/tag/7.0.0 https://www.npmjs.com/package/@sentry/browser/v/7.0.0 https://www.npmjs.com/package/@sentry/node/v/7.0...
X Description: Update 3: We have released 🚀 https://github.com/getsentry/sentry-javascript/releases/tag/7.0.0 https://www.npmjs.com/package/@sentry/browser/v/7.0.0 https://www.npmjs.com/package/@sentry/node/v/7.0...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/4240
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry JavaScript v7 Major Release Plan","articleBody":"### Update 3: We have released 🚀 \r\n\r\nhttps://github.com/getsentry/sentry-javascript/releases/tag/7.0.0\r\n\r\nhttps://www.npmjs.com/package/@sentry/browser/v/7.0.0\r\n\r\nhttps://www.npmjs.com/package/@sentry/node/v/7.0.0\r\n\r\n### Update 2: There are now beta releases available to test with!\r\n\r\nhttps://www.npmjs.com/package/@sentry/browser/v/next\r\n\r\nMigration guide: https://github.com/getsentry/sentry-javascript/blob/7.x/MIGRATION.md\r\n\r\n### Update: We are now actively working towards the v7 major release. While working on it, we're \"freezing\" work on `master`. \r\n\r\nFeel free to take a look at our v7 work here: https://github.com/getsentry/sentry-javascript/compare/master...7.x\r\n\r\n### Edit: This plan has now been turned into a proper Roadmap. Please see: https://github.com/getsentry/sentry-javascript/issues/4240#issuecomment-1035323682\r\n\r\nOverarching issue for: https://github.com/getsentry/sentry-javascript/milestone/11\r\n\r\nPlease see: https://github.com/getsentry/sentry-javascript/compare/master...7.x\r\n\r\nThe main goals for this next major release is web bundling optimizations and increased treeshaking support. Bundle size reduction will be a side effect of these changes, but not the explicit goal.\r\n\r\nIt's also important to note that we will **not** be breaking any top level public APIs in this major. Anything we touch will be related to internals or to integrations/transports. Therefore unless you are using custom integrations, custom clients or monkey patching our SDK, you will have to make **no** code changes when upgrading the SDK.\r\n\r\nThe following is a list of the major breaking changes that we might make in the next major release. We are not committing to including all of these changes in the next release, but any feedback/thoughts are appreciated!\r\n\r\n## Treeshaking / Bundle Size\r\n\r\n### Remove `Backend` Class\r\n- https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/basebackend.ts\r\n- Unnecessary abstraction that is part of no other SDK\r\n- Move logic into client\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/1d007e70053873d0c9fc6c428837bd303b4dbb16\r\n\r\n### Remove `callOnHub` and `invokeClient` methods\r\n- Remove `@sentry/minimal`\r\n- Just call methods directly, reduce indirection chain\r\n- Remove string bloat from dynamic dispatch\r\n- See: https://github.com/getsentry/sentry-javascript/pull/4195\r\n- [v7-dev] removing the hub https://github.com/getsentry/sentry-javascript/commit/f3bd1b22126bce0eaf76d2398f3e095e203f1e53\r\n\r\n### Extract out integrations into their own modules\r\n- Pass hub/client directly into integration instead of relying on `getCurrentHub`\r\n- Get rid of the `getIntegration` check\r\n- `defaultIntegrations` will need to turn into a function (so it can be treeshaken away if needed)\r\n- [v7-dev] Remove @sentry/integrations package https://github.com/getsentry/sentry-javascript/commit/655b7d0f86f2c741213af4ddaec6e14b0911c9d8\r\n- [TDB] Add a destructor/unmount so that integrations can be removed?\r\n\r\n### Extract out transports into their own modules\r\n- Unify transport options\r\n- Make node and browser share a single transport\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/10048e4df9bb88d0b6116d52aafd67d6d9070d94\r\n\r\n### Refactor client inheritance chain so that minimal methods are overridden\r\n- `BrowserClient` and `NodeClient` should be using as much as possible from `BaseClient`\r\n- Methods they have to define should just be `abstract` methods in `BaseClient`\r\n- In `v7-dev`:\r\n - [https://github.com/getsentry/sentry-javascript/blob/6d719e1bfb7e02214e4e5c708e5fb9b2ee0de1a2/packages/core/src/baseclient.ts#L30](https://github.com/getsentry/sentry-javascript/blob/6d719e1bfb7e02214e4e5c708e5fb9b2ee0de1a2/packages/core/src/baseclient.ts#L30)\r\n - [https://github.com/getsentry/sentry-javascript/blob/6d719e1bfb7e02214e4e5c708e5fb9b2ee0de1a2/packages/browser/src/client.ts#L37](https://github.com/getsentry/sentry-javascript/blob/6d719e1bfb7e02214e4e5c708e5fb9b2ee0de1a2/packages/browser/src/client.ts#L37) (look how small `BrowserClient` is !!!)\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/3bfb1d2854c28c5ccdad672c162c3abba6f5c6e7\r\n\r\n### Refactor API class into functions\r\n- Used by electron, react native, possibly others\r\n- This will help address a lot of the bad class identifiers (like `getEnvelopeEndpointWithUrlEncodedAuth`) that can't get minified\r\n- [https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/api.ts#L11](https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/api.ts#L11)\r\n- Will need migration guide for sdks to follow\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/bd0e035d197158526fc1f76cd45b93594dc41fce\r\n\r\n### Refactor Logger class into functions\r\n- https://github.com/getsentry/sentry-javascript/blob/master/packages/utils/src/logger.ts\r\n- We don't make use of the class, only the class instance\r\n- Perhaps we refactor so that the logger is an attribute on the client/hub?\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/aad5aa99795063c34c42bc5315f14f6a12e39fe8#diff-fb8ce9be00d2126104b433a3b3a8f76bd142c31edc10b2414eaef8f4c701c17b]\r\n\r\n### Refactor Stacktrace Parsing\r\n- Make eventParser an configurable option on the hub (that defaults to `tracekit`)\r\n- Add more fixtures for tracekit unit tests\r\n- Make tracekit smaller by removing intermediate types\r\n\r\n### Emit es6 by default\r\n- Introduce a es5 legacy bundle as alternate option for browser\r\n- react, vue, angular etc. packages will be es6 default\r\n\r\n## Dropping Support\r\n\r\n### Remove store endpoint support → only use envelopes\r\n\r\n- The envelope endpoint was added in Sentry 20.6.0, so if you are using a version of [self-hosted Sentry](https://develop.sentry.dev/self-hosted/) (aka onpremise) older than that then you will need to [upgrade](https://develop.sentry.dev/self-hosted/releases/).\r\n\r\n### Remove @sentry/integrations package \r\n- Remove old angular, vue, ember integrations (encourage people to use `@sentry/*`)\r\n- https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations/src\r\n- Ask people to upgrade to new packages\r\n\r\n### Drop support for Node v6\r\n- Improvements in node sdk (new apis)\r\n- Jest upgrades\r\n\r\n## Removing deprecations\r\n\r\n### Remove all references to @sentry/apm\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/packages/react/src/profiler.tsx#L32\r\n- https://github.com/getsentry/sentry-javascript/blob/9c25928327d7c0eaee1bdcf8a180b77e18c10653/packages/integrations/src/vue.ts#L264\r\n\r\n### Remove `whitelistUrls` and `blacklistUrls` options\r\n\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/packages/browser/src/backend.ts#L28\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/packages/core/src/integrations/inboundfilters.ts#L17\r\n- They have been superseded by `allowUrls` and `denyUrls` specifically. See [https://develop.sentry.dev/inclusion/](https://develop.sentry.dev/inclusion/) for more details\r\n\r\n### Remove `getActiveDomain`\r\n\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/packages/hub/src/hub.ts#L564\r\n\r\n### Remove tracing deprecations (`startSpan` and `child`)\r\n\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/packages/types/src/span.ts#L135\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/packages/types/src/hub.ts#L186\r\n\r\n### Remove Gatsby SDK in `window`\r\n\r\n- https://github.com/getsentry/sentry-javascript/blob/master/packages/gatsby/gatsby-browser.js#L9\r\n\r\n### Remove`registerRequestInstrumentation` name\r\n\r\n- https://github.com/getsentry/sentry-javascript/blob/5f5e9ec58bd3f5b03cb4029fd614b6632c8353b7/packages/tracing/src/index.ts#L12\r\n\r\n## Dependency upgrades\r\n\r\n### Upgrade Typescript (lol)\r\n\r\n- https://github.com/getsentry/sentry-javascript/blob/4887f98822e277a6b7f06415be7fba05e585889e/scripts/verify-packages-versions.js#L7\r\n\r\n### Upgrade to Ember 4.x / ember-auto-import 2.x\r\n\r\n- https://github.com/getsentry/sentry-javascript/issues/4179\r\n- If we don't solve this with a backward/forwards compatible change, ember-auto-import 2 is the bridge to the new addon v2 format for Ember. Unfortunately that means the new version of our addon would need the user to have their application also on ember-auto-import 2.x, which could make this a breaking change.\r\n\r\n## Other\r\n\r\n### Remove `SentryError`\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/41e3200275544991f7932d1a0c1b43d6c7cb8372\r\n\r\n### Introduce a `getActiveTransaction` method and use it everywhere\r\n- Basically it just grabs the active transaction off the scope if it exists\r\n- Many individual sdks and users make a custom `getActiveTransaction`\r\n - Seen in angular, react, Sentry frontend etc.\r\n\r\n### Remove SyncPromise API\r\n- Node background worker\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/eb33c75840ea3bb663ae1980d13f3515f7cd9446\r\n\r\n### Remove `@sentry/wasm` in favour of just exporting an integration\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/f403df2631e02e7bee3d34cc032144b9306b9436\r\n - A lot of stuff can be deleted\r\n- `@sentry/integration-browser-wasm`\r\n- Only around 500 downloads a week, worth the cleanup for us (less technical debt)\r\n - [https://www.npmjs.com/package/@sentry/wasm](https://www.npmjs.com/package/@sentry/wasm)\r\n\r\n### Remove `raven-node` backward-compat code from node rejection handler\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/69d57da4d98c982a301bf30498139685d16303ec\r\n\r\n### Remove `forget` util\r\n- Remove forget async util\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/ea75675f5d5749aea1b51491587d726a6b648ce9\r\n\r\n### Remove `SDK_NAME` constants in favor of SDK metadata\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/9a44ac4bd92c4cae6b17bfcad197dfd178de10e6\r\n- Examine `_metadata` vs. `_internal`\r\n - https://github.com/getsentry/sentry-javascript/commit/ba701d16bbd8ce09736bfda79e4d15863174e162\r\n - The `API` class uses `_metadata` as an argument, so we can't change/remove the concept until we refactor the `API` class.\r\n\r\n### Inline `injectReportDialog` into `showReportDialog` and unify them\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/a28268a423e1db62185d9bfd426a4fc7bc39d348\r\n\r\n### Remove `helpers.ts` from `@sentry/browser`\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/commit/9e5e8d91b27159f42e41043ab6c8940c5fbe3659\r\n\r\n### Introduce `EventType` const enum (Low Risk - Low Reward)\r\n- [v7-dev] https://github.com/getsentry/sentry-javascript/blob/6d719e1bfb7e02214e4e5c708e5fb9b2ee0de1a2/packages/types/src/event.ts#L48-L52\r\n- Make sure it is `const enum`\r\n- [https://develop.sentry.dev/sdk/event-payloads/types/#eventtype](https://develop.sentry.dev/sdk/event-payloads/types/#eventtype)\r\n - `transaction`\r\n - `error`\r\n\r\n### Remove `event.stacktrace` field\r\n- https://github.com/getsentry/sentry-javascript/issues/2605\r\n- We can deprecate first!\r\n\r\n### Improve eventID propogation\r\n- https://github.com/getsentry/sentry-javascript/issues/4018#issuecomment-937818003\r\n- https://github.com/getsentry/sentry-javascript/pull/4065\r\n\r\n### Remove `tslint` from `@sentry-internal/typescript`\r\n- `rm -rf` https://github.com/getsentry/sentry-javascript/blob/master/packages/typescript/tslint.json\r\n\r\n### Prefix interfaces with `I` so they clearly differ from class implementations.\r\n- For ex. `IHub` instead of `Hub`","author":{"url":"https://github.com/AbhiPrasad","@type":"Person","name":"AbhiPrasad"},"datePublished":"2021-12-06T17:12:13Z","url":"https://github.com/getsentry/sentry-javascript/issues/4240"}
| 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:bf2380c0-0a63-b4ff-912f-afcc7fbdc087 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E52C:2F050A:188BD9E:20C93ED:6B042490 |
| html-safe-nonce | 587adfd1db75e759864de67c889a201d20dda4a39d02204daeb7d35132c9daec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTJDOjJGMDUwQToxODhCRDlFOjIwQzkzRUQ6NkIwNDI0OTAiLCJ2aXNpdG9yX2lkIjoiMjE4NjE1MTE4NDUyNjc0Njc2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b3094bbf4f2ecce7167371c7499d67d3525bfb18f908bcc7d9f2faf4b737e2e |
| hovercard-subject-tag | issue:1072395896 |
| 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/4240/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3d1d79427400f32463b5602d1e6ea84108e8aedbce022e038673c8d1e4c1acb/getsentry/sentry-javascript/issues/4240 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3d1d79427400f32463b5602d1e6ea84108e8aedbce022e038673c8d1e4c1acb/getsentry/sentry-javascript/issues/4240 |
| og:image:alt | Update 3: We have released 🚀 https://github.com/getsentry/sentry-javascript/releases/tag/7.0.0 https://www.npmjs.com/package/@sentry/browser/v/7.0.0 https://www.npmjs.com/package/@sentry/node/v/7.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AbhiPrasad |
| hostname | github.com |
| expected-hostname | github.com |
| None | f8d9f404447ab5df341c8a92cf5fc927730ad1321e64ac57656444d2438097f1 |
| 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 | f7edccce04851591ee529948701779ce6819bc53 |
| 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