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 available to test with!
https://www.npmjs.com/package/@sentry/browser/v/next
Migration guide: https://github.com/getsentry/sentry-javascript/blob/7.x/MIGRATION.md
Update: We are now actively working towards the v7 major release. While working on it, we're "freezing" work on master
.
Feel free to take a look at our v7 work here: master...7.x
Edit: This plan has now been turned into a proper Roadmap. Please see: #4240 (comment)
Overarching issue for: https://github.com/getsentry/sentry-javascript/milestone/11
Please see: master...7.x
The 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.
It'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.
The 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!
Treeshaking / Bundle Size
Remove Backend
Class
- https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/basebackend.ts
- Unnecessary abstraction that is part of no other SDK
- Move logic into client
- [v7-dev] 1d007e7
Remove callOnHub
and invokeClient
methods
- Remove
@sentry/minimal
- Just call methods directly, reduce indirection chain
- Remove string bloat from dynamic dispatch
- See: ref(hub): Remove _invokeClient #4195
- [v7-dev] removing the hub f3bd1b2
Extract out integrations into their own modules
- Pass hub/client directly into integration instead of relying on
getCurrentHub
- Get rid of the
getIntegration
check defaultIntegrations
will need to turn into a function (so it can be treeshaken away if needed)- [v7-dev] Remove @sentry/integrations package 655b7d0
- [TDB] Add a destructor/unmount so that integrations can be removed?
Extract out transports into their own modules
- Unify transport options
- Make node and browser share a single transport
- [v7-dev] 10048e4
Refactor client inheritance chain so that minimal methods are overridden
BrowserClient
andNodeClient
should be using as much as possible fromBaseClient
- Methods they have to define should just be
abstract
methods inBaseClient
- In
v7-dev
:-
(look how small
BrowserClient
is !!!)
- [v7-dev] 3bfb1d2
Refactor API class into functions
- Used by electron, react native, possibly others
- This will help address a lot of the bad class identifiers (like
getEnvelopeEndpointWithUrlEncodedAuth
) that can't get minified - https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/api.ts#L11
- Will need migration guide for sdks to follow
- [v7-dev] bd0e035
Refactor Logger class into functions
- https://github.com/getsentry/sentry-javascript/blob/master/packages/utils/src/logger.ts
- We don't make use of the class, only the class instance
- Perhaps we refactor so that the logger is an attribute on the client/hub?
- [v7-dev] aad5aa9#diff-fb8ce9be00d2126104b433a3b3a8f76bd142c31edc10b2414eaef8f4c701c17b%5D
Refactor Stacktrace Parsing
- Make eventParser an configurable option on the hub (that defaults to
tracekit
) - Add more fixtures for tracekit unit tests
- Make tracekit smaller by removing intermediate types
Emit es6 by default
- Introduce a es5 legacy bundle as alternate option for browser
- react, vue, angular etc. packages will be es6 default
Dropping Support
Remove store endpoint support → only use envelopes
- The envelope endpoint was added in Sentry 20.6.0, so if you are using a version of self-hosted Sentry (aka onpremise) older than that then you will need to upgrade.
Remove @sentry/integrations package
- Remove old angular, vue, ember integrations (encourage people to use
@sentry/*
) - https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations/src
- Ask people to upgrade to new packages
Drop support for Node v6
- Improvements in node sdk (new apis)
- Jest upgrades
Removing deprecations
Remove all references to @sentry/apm
Remove whitelistUrls
and blacklistUrls
options
- They have been superseded by
allowUrls
anddenyUrls
specifically. See https://develop.sentry.dev/inclusion/ for more details
Remove getActiveDomain
sentry-javascript/packages/hub/src/hub.ts
Line 564 in 4887f98
Remove tracing deprecations (startSpan
and child
)
sentry-javascript/packages/types/src/span.ts
Line 135 in 4887f98
sentry-javascript/packages/types/src/hub.ts
Line 186 in 4887f98
Remove Gatsby SDK in window
RemoveregisterRequestInstrumentation
name
Dependency upgrades
Upgrade Typescript (lol)
Upgrade to Ember 4.x / ember-auto-import 2.x
- Support Ember 4.x / ember-auto-import 2.x #4179
- 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.
Other
Remove SentryError
- [v7-dev] 41e3200
Introduce a getActiveTransaction
method and use it everywhere
- Basically it just grabs the active transaction off the scope if it exists
- Many individual sdks and users make a custom
getActiveTransaction
- Seen in angular, react, Sentry frontend etc.
Remove SyncPromise API
- Node background worker
- [v7-dev] eb33c75
Remove @sentry/wasm
in favour of just exporting an integration
- [v7-dev] f403df2
- A lot of stuff can be deleted
@sentry/integration-browser-wasm
- Only around 500 downloads a week, worth the cleanup for us (less technical debt)
Remove raven-node
backward-compat code from node rejection handler
- [v7-dev] 69d57da
Remove forget
util
- Remove forget async util
- [v7-dev] ea75675
Remove SDK_NAME
constants in favor of SDK metadata
- [v7-dev] 9a44ac4
- Examine
_metadata
vs._internal
- ba701d1
- The
API
class uses_metadata
as an argument, so we can't change/remove the concept until we refactor theAPI
class.
Inline injectReportDialog
into showReportDialog
and unify them
- [v7-dev] a28268a
Remove helpers.ts
from @sentry/browser
- [v7-dev] 9e5e8d9
Introduce EventType
const enum (Low Risk - Low Reward)
- [v7-dev]
sentry-javascript/packages/types/src/event.ts
Lines 48 to 52 in 6d719e1
- Make sure it is
const enum
- https://develop.sentry.dev/sdk/event-payloads/types/#eventtype
transaction
error
Remove event.stacktrace
field
- Drop event.stacktrace #2605
- We can deprecate first!
Improve eventID propogation
- lastEventId is wrong when errors are Deduped #4018 (comment)
- ref(hub): Mimic
sentry-python
's behaviour of creating and passingevent_id
s #4065
Remove tslint
from @sentry-internal/typescript
Prefix interfaces with I
so they clearly differ from class implementations.
- For ex.
IHub
instead ofHub