Sentry is like a security camera for your app — it records every crash, error, and slowdown so you can fix problems before your users even notice. Instead of waiting for someone to say "it's broken," you already know. This guide covers everything you need to get started.
Sentry is an error monitoring and performance tracking tool. In plain English: it watches your app 24/7 and tells you whenever something goes wrong. A button that does not work? Sentry catches it. A page that loads too slowly? Sentry flags it. A crash that only happens on certain phones? Sentry records every detail.
Think of it like a black box recorder on an airplane. When something goes wrong, you can look at the recording to see exactly what happened — what the user was doing, what data was involved, and which specific line of code caused the problem. Without Sentry, you are flying blind, hoping users will report bugs (they usually do not).
Sentry does not just collect errors — it organizes them. If 500 users hit the same bug, Sentry groups those into a single issue instead of sending you 500 separate alerts. It shows you which errors are most common, which affect the most users, and which started happening after a specific deployment.
One of Sentry's most impressive features is Session Replay. It literally records what the user saw on their screen when the error happened — so you can watch a video of the bug occurring. It is like looking over the user's shoulder (in a privacy-safe way).
If real people are using your app, you need to know when it breaks. Sentry tells you immediately, often before your users even notice.
You cannot manually test every page on every device. Sentry catches errors you would never find on your own, even if it is just you building the app.
When AI tools generate code, bugs are inevitable. Sentry catches them in production so you can fix issues quickly without slowing down your building pace.
Nothing ruins trust faster than a broken app. Sentry helps you find and fix problems quickly, keeping your users happy and your reputation intact.
Pricing: Free tier includes 5,000 errors per month, 10,000 performance transactions, and 500 session replays — plenty for most small apps. Team plan is $26/month for more volume and team features. Business plan is $80/month for advanced features.
Sign up with your GitHub, Google, or email account. The free tier is generous enough for most small to medium apps. No credit card required.
Select your framework (Next.js, React, Node.js, etc.) and Sentry gives you a unique project ID and DSN (a URL your app uses to send errors to Sentry).
Ask your AI tool: 'Add Sentry error monitoring to this project.' It will install the right package and add the configuration. For Next.js, Sentry even has a setup wizard that does most of the work.
Once Sentry is configured and your app is deployed, errors start showing up in your Sentry dashboard automatically. No extra steps needed — it just works.
Configure Sentry to notify you when errors happen. Get alerts via email, Slack, or Discord. You can set thresholds like 'only alert me if this error happens more than 10 times in an hour.'
Catches every crash and unhandled error in your app automatically. Shows you the error message, how many users it affected, and when it started happening.
Shows you exactly which file and line of code caused the error. Like getting a map with an X marking the spot of the problem.
Tracks how fast your pages load and your API responds. Highlights the slowest parts of your app so you know what to optimize.
Records what the user saw on their screen when the error happened. Watch a video of the bug occurring to understand exactly what went wrong.
Tags errors with the version of your app that caused them. Know instantly if a new deployment introduced new bugs.
Get notified via email, Slack, or Discord when errors happen. Set conditions like 'alert me if a new error is seen' or 'if error count exceeds 50 in an hour.'
Let users report bugs directly from your app. A small widget appears when an error occurs, asking the user what happened. Their feedback gets attached to the error.
Shows a timeline of what happened before the error — which pages the user visited, which buttons they clicked, which API calls were made. Like digital footprints leading to the problem.
If 1,000 users hit the same bug, Sentry groups them into one issue instead of 1,000 separate alerts. Shows you the most impactful errors first.
Production code is usually compressed and unreadable. Source maps let Sentry show you the original, human-readable code in stack traces instead of garbled minified code.
Copy these prompts into your AI tool to set up and configure Sentry in your project.
1. Set up Sentry in a Next.js project
"Add Sentry error monitoring to this Next.js project. Install @sentry/nextjs, run the Sentry setup wizard, and configure it with my DSN. Set up error tracking for both client-side and server-side errors. Enable performance monitoring and session replay. Make sure source maps are uploaded during build."
2. Create a custom error boundary
"Create a custom error boundary component that catches React errors and reports them to Sentry. Show a user-friendly error message with a 'Try Again' button that reloads the page. Include the Sentry event ID so users can reference it when contacting support. Use the Sentry ErrorBoundary component as the base."
3. Add performance monitoring
"Configure Sentry performance monitoring for this Next.js app. Track page load times, API route response times, and database query durations. Set the sample rate to 20% for production (to stay within the free tier limits). Add custom spans for important operations like checkout and search."
4. Set up alert rules
"Walk me through setting up Sentry alert rules for my app. I want to be notified when: a new error is first seen, an error happens more than 50 times in an hour, or a page takes longer than 3 seconds to load. I want alerts sent to my email and Slack channel."
5. Add user context to errors
"Configure Sentry to include user information with each error report. When a logged-in user hits an error, I want to see their user ID, email, and name in Sentry. Set the user context after they log in and clear it when they log out. Do NOT send passwords or sensitive data."
6. Track custom events
"Add custom Sentry tracking for important actions in my app. Capture a breadcrumb when a user adds an item to their cart, starts checkout, and completes a purchase. If the payment fails, capture it as a Sentry error with the payment error details attached (but NOT the credit card number)."
7. Set up release tracking
"Configure Sentry release tracking for my Next.js app deployed on Vercel. Each deployment should create a new Sentry release with the Git commit hash as the version. Upload source maps for each release so stack traces show the original code. Show which release introduced new errors."
8. Add the user feedback widget
"Add the Sentry user feedback widget to my app. When an error occurs, show a small dialog asking the user to describe what they were doing. Attach their feedback to the Sentry error report. Style the widget to match my app's design with a purple accent color."
Add Sentry to your project before it goes live. This way you catch errors from day one instead of discovering them weeks later through angry user emails.
Performance monitoring and session replay can use up your quota fast. Set the sample rate to 10-20% in production — you get enough data to spot trends without burning through your free tier.
It is tempting to mark errors as 'ignored' and move on. Instead, fix them or resolve them properly. A backlog of ignored errors makes it harder to spot new, real problems.
Without source maps, Sentry shows you minified code that is impossible to read. Source maps translate it back to your original code. Most AI tools can set this up automatically.
Sentry is most useful when it proactively tells you about problems. Set up alerts for new issues and high-frequency errors so you can respond quickly.
Dedicate 15-30 minutes per week to reviewing Sentry issues. Sort by 'most users affected' to prioritize the bugs that matter most. This small habit keeps your app reliable.
Check that your DSN is correct and that the Sentry SDK is properly initialized. Try throwing a test error with Sentry.captureException(new Error('test')) to verify the connection. Make sure your ad blocker is not blocking Sentry's requests.
Stack traces show minified code instead of your real code. Make sure source maps are being uploaded during your build process. For Vercel deployments, set the SENTRY_AUTH_TOKEN environment variable. Ask your AI: 'Fix Sentry source maps for my Next.js project on Vercel.'
Bots and web crawlers can trigger JavaScript errors that clutter your dashboard. Set up Sentry inbound filters to ignore errors from known bots. Go to Settings > Inbound Filters in your Sentry project and enable 'Filter out known web crawlers.'
If you are running out of error quota, first fix the most frequent errors — one fix can eliminate thousands of events. Then reduce your sample rate for performance monitoring. You can also set up rate limiting in Sentry settings to cap events per hour.
Performance monitoring needs to be explicitly enabled. Check that tracesSampleRate is set in your Sentry configuration (e.g., 0.1 for 10%). For Next.js, make sure the Sentry config is in both sentry.client.config.ts and sentry.server.config.ts.
The Sentry Next.js plugin wraps your webpack config and can occasionally conflict with other plugins. Check the build output for specific error messages. Ask your AI: 'My build is failing after adding Sentry. Here is the error: [paste error]. Fix it.'
Wondering how Sentry compares to other error monitoring tools? Here is a quick breakdown.
LogRocket focuses heavily on session replay — recording user sessions so you can watch what they did. Sentry is more focused on error tracking and performance monitoring, with session replay as an added feature. If your main goal is understanding user behavior, LogRocket is great. If you want comprehensive error monitoring with some session replay, Sentry is the better all-rounder.
Bugsnag is a solid error monitoring tool with a clean interface. Sentry has more features overall — performance monitoring, session replay, release tracking — and a more generous free tier. Bugsnag is simpler to set up if you only need basic error tracking. Sentry is better if you want the full picture.
Datadog is an enterprise monitoring platform that covers infrastructure, logs, APM, and more. It is much more powerful but also much more complex and expensive. Sentry is focused on application errors and performance, making it easier to set up and understand. For small to medium apps, Sentry is the right choice. Datadog is for large teams with complex infrastructure.
New Relic is a full observability platform similar to Datadog — it monitors servers, databases, infrastructure, and applications. Sentry is simpler and more focused on application-level errors. If you just want to know when your app breaks and why, Sentry is easier and cheaper. New Relic is for teams who need to monitor everything in their stack.