Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
getsentry avatar

Sentry Sdk Upgrade

  • 2.5k installs
  • 243 repo stars
  • Updated July 27, 2026
  • getsentry/sentry-for-ai

sentry-sdk-upgrade guides major-version migrations for Sentry JavaScript SDKs with framework-aware detection.

About

The sentry-sdk-upgrade skill migrates Sentry JavaScript SDKs across major versions such as v7 to v8, v8 to v9, or v9 to v10 with AI-guided file-by-file changes. Detection reads all @sentry package versions in package.json, infers framework targets like Next.js, Nuxt, SvelteKit, React SPA, Express, or NestJS, locates sentry config and instrumentation files, and greps deprecated imports from @sentry/hub, @sentry/tracing, BrowserTracing, startTransaction, getCurrentHub, and related APIs. Recommendations load version-specific references v7-to-v8, v8-to-v9, and v9-to-v10, categorizing auto-fixable import renames, AI-assisted hub and transaction migrations, and manual review items with no direct equivalent. Multi-hop jumps apply incremental code changes while bumping packages once to the final target major. Guide phase updates imports, API renames, Sentry.init config, complex sampler flattening, then aligns all @sentry packages to the same major before tsc and build verification. Framework-specific steps highlight Next.js instrumentation.ts, Nuxt plugins, SvelteKit hooks, and NestJS decorator renames. Cross-link verification checks uniform versions, removed package imports, compilation,.

  • Reads all @sentry/* versions and detects framework from package.json dependencies.
  • Greps v7 and v8 deprecated patterns like startTransaction and getCurrentHub.
  • Loads v7-to-v8, v8-to-v9, and v9-to-v10 reference guides per hop.
  • All @sentry packages must share the same major version after upgrade.
  • Verify with tsc --noEmit and npm run build after dependency updates.

Sentry Sdk Upgrade by the numbers

  • 2,467 all-time installs (skills.sh)
  • +51 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #17 of 257 Release Management skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

sentry-sdk-upgrade capabilities & compatibility

Capabilities
package.json @sentry version and framework detec · deprecated pattern greps across config and sourc · version specific migration reference loading · incremental import, api, and init config updates · build and typescript verification checklist
Works with
sentry · vercel
Use cases
refactoring · ci cd · debugging
From the docs

What sentry-sdk-upgrade says it does

Upgrade the Sentry JavaScript SDK across major versions with AI-guided migration.
SKILL.md
All packages must be on the same major version.
SKILL.md
npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-sdk-upgrade

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.5k
repo stars243
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorygetsentry/sentry-for-ai

How do I upgrade Sentry from v7 to v8 or v8 to v9 without breaking tracing and init config?

Upgrade @sentry JavaScript packages across major versions by detecting framework, deprecated patterns, and applying migration references.

Who is it for?

JavaScript apps hitting deprecated Sentry APIs after a major version bump.

Skip if: Skip for first-time Sentry install; use framework-specific SDK setup skills instead.

When should I use this skill?

User asks to upgrade Sentry, migrate SDK versions, or fix deprecated Sentry APIs after bumping packages.

What you get

Updated @sentry packages on one major version with imports and init config migrated per reference guides.

  • Migrated Sentry config files
  • Updated SDK imports
  • Verified instrumentation setup

By the numbers

  • Grep patterns cover 6 file extensions: `.ts`, `.js`, `.tsx`, `.jsx`, `.mjs`, `.cjs`

Files

SKILL.mdMarkdownGitHub ↗
All Skills > Workflow > SDK Upgrade

Sentry JavaScript SDK Upgrade

Upgrade the Sentry JavaScript SDK across major versions with AI-guided migration.

Invoke This Skill When

  • User asks to "upgrade Sentry" or "migrate Sentry SDK"
  • User mentions deprecated Sentry APIs or breaking changes after a version bump
  • User wants to move from v7 to v8, v8 to v9, or any major version jump
  • User encounters errors after updating @sentry/* package versions
  • User asks about Sentry migration guides or changelogs

Phase 1: Detect

Identify the current Sentry SDK version, target version, and framework.

1.1 Read package.json

cat package.json | grep -E '"@sentry/' | head -20

Extract:

  • All @sentry/* packages and their current versions
  • The current major version (e.g., 7.x, 8.x, 9.x)

1.2 Detect Framework

Check package.json dependencies for framework indicators:

DependencyFrameworkSentry Package
nextNext.js@sentry/nextjs
nuxt or @nuxt/kitNuxt@sentry/nuxt
@sveltejs/kitSvelteKit@sentry/sveltekit
@remix-run/nodeRemix@sentry/remix
react (no Next/Remix)React SPA@sentry/react
@angular/coreAngular@sentry/angular
vue (no Nuxt)Vue@sentry/vue
expressExpress@sentry/node
@nestjs/coreNestJS@sentry/nestjs
@solidjs/startSolidStart@sentry/solidstart
astroAstro@sentry/astro
bun types or runtimeBun@sentry/bun
@cloudflare/workers-typesCloudflare@sentry/cloudflare
None of above (Node.js)Node.js@sentry/node

1.3 Find Sentry Config Files

grep -rn "from '@sentry/\|require('@sentry/" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" --include="*.mjs" --include="*.cjs" -l
find . -name "sentry.*" -o -name "*.sentry.*" -o -name "instrumentation.*" | grep -v node_modules | grep -v .next | grep -v .nuxt

1.4 Detect Deprecated Patterns

Scan for patterns that indicate which migration steps are needed:

# v7 patterns (need v7→v8 migration)
grep -rn "from '@sentry/hub'\|from '@sentry/tracing'\|from '@sentry/integrations'\|from '@sentry/serverless'\|from '@sentry/replay'" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l
grep -rn "new BrowserTracing\|new Replay\|startTransaction\|configureScope\|Handlers\.requestHandler\|Handlers\.errorHandler" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l

# v8 patterns (need v8→v9 migration)
grep -rn "from '@sentry/utils'\|from '@sentry/types'" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l
grep -rn "getCurrentHub\|enableTracing\|captureUserFeedback\|@WithSentry\|autoSessionTracking" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l

1.5 Determine Target Version

If the user didn't specify a target version, recommend the latest major version (v9 as of this writing). If the user has already bumped package versions but has broken code, detect the target from package.json.

Phase 2: Recommend

Present a migration summary based on detected state.

2.1 Calculate Migration Path

  • Single hop: e.g., v8 to v9
  • Multi-hop: e.g., v7 to v9 (apply v7→v8 changes first, then v8→v9)

For multi-hop migrations, apply code changes incrementally but update package versions once to the final target.

2.2 Present Breaking Changes Summary

Load the appropriate version-specific reference:

  • v7→v8: references/v7-to-v8.md
  • v8→v9: references/v8-to-v9.md
  • v9→v10: references/v9-to-v10.md

Present a concrete summary of changes needed, categorized by complexity:

Auto-fixable (apply directly):

  • Package import renames (e.g., @sentry/utils to @sentry/core)
  • Simple method renames (e.g., @WithSentry to @SentryExceptionCaptured)
  • Config option swaps (e.g., enableTracing to tracesSampleRate)

AI-assisted (explain and propose):

  • Hub removal with variable storage patterns
  • Performance API migration (transactions to spans)
  • Complex config restructuring (Vue tracing options, Next.js config merging)
  • Sampler transactionContext flattening

Manual review (flag for user):

  • Removed APIs with no equivalent
  • Behavioral changes (sampling, source maps defaults)
  • Custom transport modifications

2.3 Confirm Scope

Ask the user:

  • Confirm the migration path (e.g., "v8 to v9")
  • Confirm whether to proceed with all changes or specific categories
  • Note: npx @sentry/wizard -i upgrade exists as a CLI alternative for v8→v9 but may not handle all patterns

Phase 3: Guide

Step through changes file by file.

3.1 Process Each File with Sentry Imports

For each file identified in Phase 1.3:

1. Read the file to understand current Sentry usage 2. Apply auto-fixable changes directly:

  • Package import renames
  • Method/function renames
  • Simple config option swaps

3. For AI-assisted changes, explain what needs to change and why, then propose the specific edit 4. For uncertain changes, show the code and ask the user to confirm

3.2 Apply Changes by Category

Work through changes in this order:

Step 1: Package Import Updates

Replace removed/renamed package imports. Reference the version-specific migration file for the complete mapping.

Step 2: API Renames

Apply mechanical method and function renames.

Step 3: Config Changes

Update Sentry.init() options and build configuration.

Step 4: Complex Pattern Migration

Handle patterns requiring understanding of context:

  • Hub usage stored in variables
  • Transaction-based performance code
  • Custom integration classes
  • Framework-specific wrappers
Step 5: Update package.json Versions

Update all @sentry/* packages to the target version. All packages must be on the same major version.

# Detect package manager
if [ -f "yarn.lock" ]; then
  echo "yarn"
elif [ -f "pnpm-lock.yaml" ]; then
  echo "pnpm"
else
  echo "npm"
fi

Install updated dependencies using the detected package manager.

Step 6: Verify Build
# Check for type errors
npx tsc --noEmit 2>&1 | head -50

# Run build
npm run build 2>&1 | tail -20

Fix any remaining type errors or build failures.

3.3 Framework-Specific Steps

Consult references/upgrade-patterns.md for framework-specific config file locations and validation steps.

Next.js: Check instrumentation.ts, next.config.ts wrapper, both client and server configs. Nuxt: Check Nuxt module config and both plugin files. SvelteKit: Check hooks files and Vite config. Express/Node: Verify early initialization order. NestJS: Check for decorator and filter renames.

Phase 4: Cross-Link

4.1 Verify

  • [ ] All @sentry/* packages on same version
  • [ ] No import errors from removed packages
  • [ ] TypeScript compilation passes
  • [ ] Build succeeds
  • [ ] Tests pass (if they exist)

Suggest adding a test error:

// Add temporarily to verify Sentry is working after upgrade
setTimeout(() => {
  throw new Error('Sentry upgrade verification - safe to delete');
}, 3000);

4.2 New Features in Target Version

Mention features available in the new version that the user might want to enable:

v8 new features: OpenTelemetry-based Node tracing, automatic database/HTTP instrumentation, functional integrations, new span APIs

v9 new features: Structured logging (Sentry.logger.*), improved source maps handling, simplified configuration

4.3 Related Resources

If the user has other Sentry SDKs (Python, Ruby, Go, etc.) that also need upgrading, note that this skill covers JavaScript SDK only.

Related skills

How it compares

Use this during `@sentry/*` major bumps when you need repo-wide import discovery plus migration patterns, not first-time Sentry setup docs.

FAQ

How do I know which migration guide to load?

Match the detected current and target majors to v7-to-v8, v8-to-v9, or v9-to-v10 reference files.

Can @sentry packages stay on different majors?

No. All @sentry/* packages must be on the same major version after the upgrade.

What verifies the migration succeeded?

Run tsc --noEmit and npm run build, then confirm no imports from removed packages remain.

Is Sentry Sdk Upgrade safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Release Managementintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.