Skip to content
Home / Migrations / Sentry SDK v7Sentry SDK v8

Sentry SDK v7 Sentry SDK v8

medium

Sentry v8 brings OpenTelemetry integration, smaller bundle, and auto-instrumentation. Init order matters — v8 is strict about it.

Estimated: 2-4h · 5 steps
Progress0%
Step 1: Upgrade package
npm install @sentry/node@latest @sentry/browser@latest
Step 2: Fix init order

Sentry.init() must be the FIRST thing that runs. Use --require or instrumentation.ts.

// instrumentation.ts (Next.js)
import * as Sentry from '@sentry/nextjs'
Sentry.init({ dsn: process.env.SENTRY_DSN })
Step 3: Update custom integrations

setupOnce() removed. Use setup() and processEvent() instead. Check the migration guide.

Step 4: Remove deprecated APIs

Sentry.configureScope() → Sentry.withScope(). Hub.run() removed. getCurrentScope() is the new API.

Step 5: Verify
Errors appear in Sentry dashboard. Traces captured. Bundle size reduced.

What this migration involves

Moving from Sentry SDK v7 to Sentry SDK v8 is rated medium and takes about 2-4h on a typical project. The guide breaks it into 5 steps, 2 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from Sentry SDK v7 to Sentry SDK v8 take?

Around 2-4h for a typical project — 5 steps, difficulty rated medium, 2 of them with copy-paste commands.

Is moving from Sentry SDK v7 to Sentry SDK v8 reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Sentry SDK v7 data before you start.

What does Sentry SDK v8 cost compared to Sentry SDK v7?

Pricing for both tools is contact-based or not tracked yet.