Skip to main content
This guide provides general advice for upgrading between Sentry SDK versions safely and efficiently.

Before You Upgrade

1. Review the Changelog

Always read the changelog for the target version:

2. Check Your Current Version

3. Review Deprecation Warnings

Upgrade to the latest version in your current major version first:
Fix all deprecation warnings before upgrading major versions.

Upgrade Strategies

Minor/Patch Upgrades

Minor and patch upgrades are safe and backwards compatible:

Major Version Upgrades

Major upgrades require more care: 1. Test in Development First:
2. Create a Branch:
3. Update All Sentry Packages:
All Sentry packages should be on the same major version. Mixing versions can cause issues.
4. Run Migration Tool: For v7 to v8, use the automated migration tool:
5. Manual Updates: Review and update code that the tool couldn’t fix automatically. 6. Test Thoroughly:
7. Deploy to Staging: Test in a staging environment before production.

Upgrading Multiple Versions

If you’re several major versions behind: You can usually skip directly to the latest version:
Then review all migration guides:

Incremental Upgrades (Safer)

For large or complex applications:

Common Upgrade Tasks

Update Import Statements

Major versions often reorganize exports: v7 to v8:

Update Integration Syntax

v7 to v8:

Update Performance API

v7 to v8:

Testing Your Upgrade

1. Unit Tests

Ensure existing tests pass:

2. Type Checking

If using TypeScript:

3. Build

Ensure the project builds:

4. Manual Testing

Test key functionality:
  • Error capturing works
  • Performance monitoring works
  • Source maps work in production
  • Integrations work (Replay, Feedback, etc.)

5. Staging Deployment

Deploy to a staging environment and verify:
  • Events appear in Sentry
  • Stack traces are readable
  • Performance data is captured
  • No console errors

Rollback Plan

Always have a rollback strategy:

1. Git Revert

2. Package Lock

Keep old package-lock.json or yarn.lock:

3. Version Pin

Temporarily pin to old version:

Framework-Specific Considerations

Next.js

Next.js SDK has additional requirements:
See Next.js migration guide for details.

Node.js

v8+ requires initialization before imports:

React

Update Error Boundary usage:

Troubleshooting

Symptoms: TypeScript or build errorsSolutions:
  1. Update TypeScript: npm install typescript@latest
  2. Clear build cache: rm -rf node_modules/.cache
  3. Reinstall dependencies: rm -rf node_modules && npm install
Symptoms: Errors in production that don’t appear in developmentSolutions:
  1. Check source maps are uploaded correctly
  2. Verify release name matches between SDK and uploaded source maps
  3. Check browser compatibility (especially for v8+)
Symptoms: Events not appearing after upgradeSolutions:
  1. Check console for SDK errors
  2. Verify DSN is correct
  3. Check enabled option isn’t set to false
  4. Verify sampling rates aren’t too low
Symptoms: No transactions in SentrySolutions:
  1. Ensure tracesSampleRate is set: tracesSampleRate: 0.1
  2. Check integrations are loaded: browserTracingIntegration()
  3. For Node.js v8+, ensure Sentry is initialized first

Best Practices

1. Upgrade Regularly

Stay within 1-2 major versions of the latest:
  • Get new features and fixes
  • Easier upgrades (less breaking changes to handle)
  • Better security
  • Continued support

2. Use Version Ranges

Allow automatic patch updates:

3. Monitor Sentry Releases

Subscribe to releases:

4. Test Before Production

Always test in staging:

5. Keep Dependencies Updated

Update framework and build tools too:

6. Document Your Configuration

Maintain documentation of your Sentry setup:

Version-Specific Guides

v7 to v8

Major changes in v8

v8 to v10

Changes in v9 and v10

Getting Help

If you encounter issues during an upgrade:
  1. Check docs: docs.sentry.io
  2. Search issues: github.com/getsentry/sentry-javascript/issues
  3. Ask community: discord.gg/sentry
  4. Contact support: For paid plans

Upgrade Checklist

  • Review changelog and migration guides
  • Check current version
  • Create upgrade branch
  • Update all @sentry/* packages
  • Run migration tool (if available)
  • Update imports and API usage
  • Update configuration
  • Run tests
  • Test locally
  • Deploy to staging
  • Monitor staging for issues
  • Deploy to production
  • Monitor production
  • Update documentation

Next Steps

Setup Guide

Configure the SDK

Best Practices

Learn best practices