Skip to content

Sentry JavaScript v7 Major Release Plan #4240

Closed
@AbhiPrasad

Description

@AbhiPrasad

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

Remove callOnHub and invokeClient methods

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

Refactor API class into functions

Refactor Logger class into functions

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

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

Remove getActiveDomain

Remove tracing deprecations (startSpan and child)

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

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

Remove raven-node backward-compat code from node rejection handler

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 the API class.

Inline injectReportDialog into showReportDialog and unify them

Remove helpers.ts from @sentry/browser

Introduce EventType const enum (Low Risk - Low Reward)

Remove event.stacktrace field

Improve eventID propogation

Remove tslint from @sentry-internal/typescript

Prefix interfaces with I so they clearly differ from class implementations.

  • For ex. IHub instead of Hub

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions