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: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:Upgrading Multiple Versions
If you’re several major versions behind:Skip Intermediate Versions (Recommended)
You can usually skip directly to the latest version: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 oldpackage-lock.json or yarn.lock:
3. Version Pin
Temporarily pin to old version:Framework-Specific Considerations
Next.js
Next.js SDK has additional requirements:Node.js
v8+ requires initialization before imports:React
Update Error Boundary usage:Troubleshooting
Build errors after upgrade
Build errors after upgrade
Symptoms: TypeScript or build errorsSolutions:
- Update TypeScript:
npm install typescript@latest - Clear build cache:
rm -rf node_modules/.cache - Reinstall dependencies:
rm -rf node_modules && npm install
Runtime errors in production
Runtime errors in production
Symptoms: Errors in production that don’t appear in developmentSolutions:
- Check source maps are uploaded correctly
- Verify release name matches between SDK and uploaded source maps
- Check browser compatibility (especially for v8+)
Missing events in Sentry
Missing events in Sentry
Symptoms: Events not appearing after upgradeSolutions:
- Check console for SDK errors
- Verify DSN is correct
- Check
enabledoption isn’t set tofalse - Verify sampling rates aren’t too low
Performance data not captured
Performance data not captured
Symptoms: No transactions in SentrySolutions:
- Ensure
tracesSampleRateis set:tracesSampleRate: 0.1 - Check integrations are loaded:
browserTracingIntegration() - 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:- Check docs: docs.sentry.io
- Search issues: github.com/getsentry/sentry-javascript/issues
- Ask community: discord.gg/sentry
- 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