Skip to content

Update dependency @sentry/browser to v8

This MR contains the following updates:

Package Type Update Change
@sentry/browser (source) dependencies major 7.114.0 -> 8.2.1

MR created with the help of gitlab-org/frontend/renovate-gitlab-bot


Release Notes

getsentry/sentry-javascript (@​sentry/browser)

v8.2.1

Compare Source

  • fix(aws-serverless): Fix build of lambda layer (#​12083)
  • fix(nestjs): Broaden nest.js type (#​12076)

v8.2.0

Compare Source

  • feat(redis-cache): Create cache-span with prefixed keys (get/set commands) (#​12070)
  • feat(core): Add beforeSendSpan hook (#​11886)
  • feat(browser): Improve idle span handling (#​12065)
  • fix(node): Set transactionName for unsampled spans in httpIntegration (#​12071)
  • fix(core): Export Scope interface as Scope (#​12067)
  • fix(core): Avoid looking up client for hasTracingEnabled() if possible (#​12066)
  • fix(browser): Use consistent timestamps (#​12063)
  • fix(node): Fix check for performance integrations (#​12043)
  • ref(sveltekit): Warn to delete source maps if Sentry plugin enabled source maps generation (#​12072)

v8.1.0

Compare Source

This release mainly fixes a couple of bugs from the initial 8.0.0 release. In addition to the changes below, we updated some initially missed points in our migration guides and documentation.

  • feat(aws-serverless): Fix tree-shaking for aws-serverless package (#​12017)
  • feat(node): Bump opentelemetry instrumentation to latest version (#​12028)
  • feat(scope): Bring back lastEventId on isolation scope (#​11951) (#​12022)
  • fix(aws-serverless): Export awslambda-auto
  • fix(node): Do not warn for missing instrumentation if SDK is disabled (#​12041)
  • fix(react): Set dependency-injected functions as early as possible (#​12019)
  • fix(react): Warn and fall back gracefully if dependency injected functions are not available (#​12026)
  • ref(core): Streamline parseSampleRate utility function (#​12024)
  • ref(feedback): Make eventId optional and use lastEventId in report dialog (#​12029)

v8.0.0

Compare Source

The Sentry JS SDK team is proud to announce the release of version 8.0.0 of Sentry's JavaScript SDKs - it's been a long time coming! Thanks to everyone for your patience and a special shout out to the brave souls testing preview builds and reporting issues - we appreciate your support!


How to Upgrade to Version 8:

We recommend reading the migration guide docs to find out how to address any breaking changes in your code for your specific platform or framework.

To automate upgrading to v8 as much as possible, use our migration codemod @sentry/migr8:

npx @​sentry/migr8@​latest

All deprecations from the v7 cycle, with the exception of getCurrentHub(), have been removed and can no longer be used in v8. If you have an advanced Sentry SDK setup, we additionally recommend reading the in-depth migration guide in our repo which highlights all changes with additional details and information.

The rest of this changelog highlights the most important (breaking) changes and links to more detailed information.

Version Support

With v8, we dropped support for several old runtimes and browsers

Node SDKs: The Sentry JavaScript SDK v8 now supports Node.js 14.8.0 or higher. This applies to @sentry/node and all of our node-based server-side sdks (@sentry/nextjs, @sentry/remix, etc.). Furthermore, version 8 now ships with full support for ESM-based node apps using Node.js 18.19.0 or higher.

Browser SDKs: The browser SDKs now require ES2018+ compatible browsers. New minimum browser versions:

  • Chrome 63
  • Edge 79
  • Safari/iOS Safari 12
  • Firefox 58
  • Opera 50
  • Samsung Internet 8.2

For more details, please see the version support section in our migration guide.

Initializing Server-side SDKs (Node, Bun, Deno, Serverless):

In v8, we support a lot more node-based packages than before. In order to ensure auto-instrumentation works, the SDK now needs to be imported and initialized before any other import in your code.

We recommend creating a new file (e.g. instrumentation.js) to import and initialize the SDK. Then, import the file on top of your entry file or detailed instructions, check our updated SDK setup docs initializing the SDK in v8.

Performance Monitoring Changes

The API around performance monitoring and tracing has been streamlined, and we've added support for more integrations out of the box.

Functional Integrations

Integrations are now simple functions instead of classes. Class-based integrations have been removed:

// old (v7)
Sentry.init({
  integrations: [new Sentry.BrowserTracing()],
});

// new (v8)
Sentry.init({
  integrations: [Sentry.browserTracingIntegration()],
});
Package removal

The following packages have been removed or replaced and will no longer be published:

Changes since 8.0.0-rc.3
  • feat(nextjs): Remove transpileClientSDK (#​11978)

    As we are dropping support for Internet Explorer 11 and other other older browser versions wih version 8.0.0, we are also removing the transpileClientSDK option from the Next.js SDK. If you need to support these browser versions, please configure Webpack and Next.js to down-compile the SDK.

  • feat(serverless): Do not include performance integrations by default (#​11998)

    To keep Lambda bundle size reasonable, the SDK no longer ships with all performance (database) integrations by default. Add the Sentry integrations of the databases and other tools you're using manually to your Sentry.init call by following this guide. Note that this change does not apply if you use the SDK with the Sentry AWS Lambda layer.

  • feat(feedback): Simplify public css configuration for feedback (#​11985)

  • fix(feedback): Check for empty user (#​11993)

  • fix(replay): Fix type for replayCanvasIntegration (#​11995)

  • fix(replay): Fix user activity not being updated in start() (#​12001)

v7.116.0

Compare Source

This release publishes a new AWS Lambda layer under the name SentryNodeServerlessSDKv7 that users still running v7 can use instead of pinning themselves to SentryNodeServerlessSDK:235.

Bundle size 📦

Path Size
@​sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 80.83 KB
@​sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 71.77 KB
@​sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 76.02 KB
@​sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 65.38 KB
@​sentry/browser (incl. Tracing) - Webpack (gzipped) 35.64 KB
@​sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 35.53 KB
@​sentry/browser (incl. Feedback) - Webpack (gzipped) 31.6 KB
@​sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.61 KB
@​sentry/browser - Webpack (gzipped) 22.78 KB
@​sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 79.04 KB
@​sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 70.37 KB
@​sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 36.05 KB
@​sentry/browser - ES6 CDN Bundle (gzipped) 25.28 KB
@​sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 221.49 KB
@​sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 109.08 KB
@​sentry/browser - ES6 CDN Bundle (minified & uncompressed) 75.81 KB
@​sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 39.33 KB
@​sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 72.27 KB
@​sentry/react - Webpack (gzipped) 22.81 KB
@​sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 90.03 KB
@​sentry/nextjs Client - Webpack (gzipped) 54.15 KB
@​sentry-internal/feedback - Webpack (gzipped) 17.34 KB

v7.115.0

Compare Source

  • feat(v7): Add support for global onUnhandled Error/Promise for Bun (#​11959)
  • fix(replay/v7): Fix user activity not being updated in start() (#​12003)
  • ref(api): Remove lastEventId deprecation warnings (#​12042)

Bundle size 📦

Path Size
@​sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 80.83 KB
@​sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 71.77 KB
@​sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 76.02 KB
@​sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 65.38 KB
@​sentry/browser (incl. Tracing) - Webpack (gzipped) 35.64 KB
@​sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 35.53 KB
@​sentry/browser (incl. Feedback) - Webpack (gzipped) 31.6 KB
@​sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.61 KB
@​sentry/browser - Webpack (gzipped) 22.78 KB
@​sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 79.04 KB
@​sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 70.37 KB
@​sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 36.05 KB
@​sentry/browser - ES6 CDN Bundle (gzipped) 25.28 KB
@​sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 221.49 KB
@​sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 109.08 KB
@​sentry/browser - ES6 CDN Bundle (minified & uncompressed) 75.81 KB
@​sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 39.33 KB
@​sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 72.27 KB
@​sentry/react - Webpack (gzipped) 22.81 KB
@​sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 90.03 KB
@​sentry/nextjs Client - Webpack (gzipped) 54.15 KB
@​sentry-internal/feedback - Webpack (gzipped) 17.34 KB

Configuration

📅 Schedule: Branch creation - "before 05:00 on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports