Prerequisites
Before you begin, make sure you have:- A Sentry account and project (sign up at sentry.io)
- Your Sentry DSN (Data Source Name) from your project settings
- Node.js installed (for package management)
Don’t have a Sentry account? Sign up for free to get started.
Step 1: Install the SDK
Choose your preferred package manager to install the Sentry SDK:Step 2: Initialize Sentry
Initialize Sentry as early as possible in your application, before any other code runs:main.ts
Step 3: Verify Installation
Test that Sentry is working correctly by triggering a test error:Step 4: View Your Error
After triggering the test error:- Go to your Sentry dashboard
- Select your project
- Navigate to Issues
- You should see your test error appear within seconds
If you see your error in Sentry, congratulations! Your integration is working correctly.
What’s Next?
Now that you have Sentry set up, explore these features to get the most out of error monitoring:Add Context
Attach user information, tags, and custom context to errors
Track Breadcrumbs
Automatically track user actions leading up to errors
Monitor Performance
Set up distributed tracing and performance monitoring
Session Replay
Enable session replay to see exactly what users experienced
Platform-Specific Quickstarts
Choose your framework for more detailed installation instructions:- React
- Next.js
- Node.js
- Vue
Common Configuration Options
Here are some commonly used configuration options:Your project’s DSN (Data Source Name) from Sentry
The environment your application is running in (e.g.,
production, staging, development)The release version of your application for tracking deployments
Sample rate for performance monitoring (0.0 to 1.0, where 1.0 = 100%)
Callback function to filter or modify events before sending to Sentry
Array of integration objects to enable additional features
Advanced Setup
Source Maps
Source Maps
Upload source maps to see readable stack traces in production:See the Source Maps guide for detailed instructions.
Filtering Errors
Filtering Errors
User Context
User Context
Custom Tags
Custom Tags
Getting Help
Documentation
Explore the full documentation
GitHub
View source code and examples
Discord
Join our community chat
Having issues? Check out our troubleshooting guide or ask for help in our Discord community.