7.0.0
Version 7 of the Sentry JavaScript SDK brings a variety of features and fixes including bundle size and performance improvements, brand new integrations, support for the attachments API, and key bug fixes.
This release does not change or remove any top level public API methods (captureException, captureMessage), and only requires changes to certain configuration options or custom clients/integrations/transports.
Note: The v7 version of the JavaScript SDK requires a self-hosted version of Sentry 20.6.0 or higher. If you are using a version of self-hosted Sentry (aka onpremise) older than 20.6.0 then you will need to upgrade.
For detailed overview of all the changes, please see our v7 migration guide.
Breaking Changes
If you are a regular consumer of the Sentry JavaScript SDK you only need to focus on the general items. The internal breaking changes are aimed at libraries that build on top of and extend the JavaScript SDK (like @sentry/electron or @sentry/react-native).
General
- Updated CommonJS distributions to use ES6 by default. If you need to support Internet Explorer 11 or old Node.js versions, we recommend using a preprocessing tool like Babel to convert Sentry packages to ES5. (#5005)
- Default
bundle.min.jsto ES6 instead of ES5. ES5 bundles are still available atbundle.es5.min.js. (#4958) - Updated build system to use TypeScript 3.8.3 (#4895)
- Deprecated
Severityenum for bundle size reasons. Please use string literals instead. (#4926) - Removed
criticalSeverity level. (#5032) whitelistUrlsandblacklistUrlshave been renamed toallowUrlsanddenyUrlsin theSentry.init()options. (#4850)BaseClientand it's child classes now requiretransport,stackParser, andintegrationsto be explicitly passed in. This was done to improve tree-shakability. (#4927)- Updated package distribution structure and stopped distributing CDN bundles through
@sentry/*npm packages. See details in our migration docs. (#4900) (#4901) - Simplified
TransportAPI. This means custom transports will have to be adjusted accordingly. - Updated how Node Transport Options are passed down.
- Start propogating
baggageHTTP header alongsidesentry-traceheader to propogate additional tracing related information. (#5133) - Renamed
registerRequestInstrumentationexport toinstrumentOutgoingRequestsin@sentry/tracing. (#4859) - Renamed
UserAgentintegration toHttpContext. (#5027) - Replaced
BrowserTracingintegration'smaxTransactionDurationoption withfinalTimeoutoption in the@sentry/tracingpackage and resetidleTimeoutbased on activities count. This should improve accuracy of web-vitals like LCP by 20-30%. (#5044) - Updated
@sentry/angularto be compiled by the angular compiler. (#4641) - Made tracing package treeshakable (#5166)
- Removed support for Node v6. (#4851)
- Removed
@sentry/minimalpackage in favour of using@sentry/hub. (#4971) - Removed support for Opera browser pre v15 (#4923)
- Removed
ignoreSentryErrorsoption from AWS lambda SDK. Errors originating from the SDK will now always be caught internally. (#4994) - Removed
Integrations.BrowserTracingexport from@sentry/nextjs. Please importBrowserTracingfrom@sentry/nextjsdirectly. - Removed static
idproperty fromBrowserTracingintegration. - Removed
SDK_NAMEexport from@sentry/browser,@sentry/node,@sentry/tracingand@sentry/vuepackages. (#5040) - Removed
Angular,Ember, andVueintegrations from@sentry/integrationsin favour of the explicit framework packages:@sentry/angular,@sentry/ember, and@sentry/vue. (#4893) - Removed enums
Status,RequestSessionStatus, andSessionStatus. Deprecated enumsSpanStatusandSeverity. This was done to save on bundle size. (#4891) (#4889) (#4890) - Removed support for deprecated
@sentry/apmpackage. (#4845) - Removed deprecated
userfield from DSN interface.publicKeyshould be used instead. (#4864) - Removed deprecated
getActiveDomainmethod andDomainAsCarriertype from@sentry/hub. (#4858) - Removed
eventStatusFromHttpCodeto save on bundle size. - Removed usage of deprecated
event.stacktracefield. (#4885) - Removed raven-node backward-compat code (#4942)
- Removed
showReportDialogmethod onBrowserClient(#4973) - Removed deprecated
startSpanandchildmethods (#4849) - Removed deprecated
frameContextLinesoptions (#4884) - Removed
Sentryfrom window in the Gatsby SDK (#4857)
Internal
- Removed support for the store endpoint (#4969)
- Made hint callback argument non-optional (#5141)
- Switched to using new transports internally (#4943)
- Removed
APIclass from@sentry/core. (#4848) - Refactored
Sessionclass to use a more functional approach. (#5054) - Removed
Backendclass in favour of moving functionality into theClientclass (for more details, see #4911 and #4919). - Removed forget async utility function (#4941)
- Removed tslint from
@sentry-internal/typescript(#4940) - Removed
_invokeClientfunction from@sentry/hub(#4972) - Removed top level eventbuilder exports (#4887)
- Added baggage API helpers in
@sentry/utils(#5066)
Other Changes
Features
- feat(tracing): Add Prisma ORM integration. (#4931)
- feat(react): Add react-router-v6 integration (#5042)
- feat: Add attachments API (#5004)
- feat: Add
namefield toEventProcessor(#4932) - feat: Expose configurable stack parser (#4902)
- feat(tracing): Make
setMeasurementpublic API (#4933) - feat(tracing): Add GB unit to device memory tag value (#4935)
- feat: Export browser integrations individually (#5028)
- feat(core): Send Baggage in Envelope Header (#5104)
Fixes
- fix(browser): Fix memory leak in
addEventListenerinstrumentation (#5147) - fix(build): Fix express import in
gcpfunction(#5097) - fix(ember): Export sha hashes of injected scripts (#5089)
- fix(hub): Add missing parameter to captureException docstring (#5001)
- fix(integrations): Mark ExtraErrorData as already normalized (#5053)
- fix(serverless): Adjust v6 Lambda layer hotfix for v7 (#5006)
- fix(tracing): Adjust sideEffects package.json entry for v7 (#4987)
- fix(tracing): Remove isInstanceOf check in Hub constructor (#5046)
- fix(tracing): Don't use
querySelectorwhen not available (#5160) - fix(nextjs): Update webpack-plugin and change how cli binary is detected. This should reduce bundle size of NextJS applications. (#4988)
- fix(utils): Fix infinite recursion in
dropUndefinedKeys(#5163)
Misc
- feat(build): Vendor polyfills injected during build (#5051)
- ref(build): Use rollup to build AWS lambda layer (#5146)
- ref(core): Make event processing log warnings instead of errors (#5010)
- ref(node): Allow node stack parser to work in browser context (#5135)
- ref(serverless): Point DSN to relay in lambda extension (#5126)
- ref(serverless): Do not throw on flush error (#5090)
- ref(utils): Clean up dangerous type casts in object helper file (#5047)
- ref(utils): Add logic to enable skipping of normalization (#5052)