How to catch errors in production: setting up monitoring in 15 minutes
Published on 2025-11-20
You deployed a new feature. Everything works perfectly on your local machine, and you’re happy with the result.
Then a message appears: “Nothing works for me.” You open the server logs — they’re empty. It turns out the error happened on the client side, from a user with an old browser version or unusual settings. And you might never have known about it.
This happens to almost everyone who deploys projects to production. It happened to me too, until I set up a tool that lets me see errors almost instantly — even if it’s the middle of the night and the problem occurred for a single user on the other side of the world.
That tool is Sentry. In this article I’ll show how to connect Sentry to your project in fifteen minutes.
Why Sentry
Imagine a CCTV system. While there are no cameras — you don’t know what’s happening in the room. Once they appear, the situation changes completely: everything is under control.
Sentry works on the same principle, but for your application. It records errors, warnings, and anomalous behavior so you learn about issues before your users do.
What Sentry gives you:
- Instant notifications: you learn about errors right away — in Telegram, Slack, email, or another channel.
- Detailed context: Sentry shows which user experienced the error, on which device, and under what conditions.
- Stack trace: the exact place in the code where everything crashed.
- Breadcrumbs: the sequence of events that led to the failure.
- Prioritization: you understand whether one person or hundreds are affected.
For personal projects and startups it’s especially nice that Sentry has a very generous free plan.
How to connect Sentry: step-by-step guide
Step 1. Sign up
Go to https://sentry.io and create an account. You can use GitHub or Google to speed up the process.
During signup choose the main language of your application. Other languages and platforms can be added later.
Step 2. Create a project
Click the Create Project button.
Choose your platform: Node.js, Python, Django, React, Next.js, Go, PHP — whatever.
Give the project a clear name, for example:
my-awesome-app
After that Sentry will generate a DSN for you — a unique address where the app will send error reports. It looks like this:
https://12345abc@o123456.ingest.sentry.io/1234567
Save this address — you’ll need it in a minute.
Step 3. Integrate Sentry into the code
Below are instructions for popular technologies. Sentry will automatically offer ready-made examples for the selected platform.
JavaScript / React / Next.js
Install dependencies:
npm install @sentry/browser @sentry/tracing
Initialize Sentry in your entry point (for example, index.js, _app.js):
import * as Sentry from "@sentry/browser";
Sentry.init({
dsn: "ВАШ_DSN_ОТСЮДА",
release: "my-awesome-app@1.0.0",
tracesSampleRate: 1.0
});
Python (Django / Flask / FastAPI)
Install:
pip install sentry-sdk
Initialize:
import sentry_sdk
sentry_sdk.init(
dsn="ВАШ_DSN_ОТСЮДА",
traces_sample_rate=1.0,
release="1.0.0",
)
Step 4. Verify it’s working
Add a temporary test error call:
throw new Error("Test Sentry Error");
Run the application, open the relevant page, then go to the Sentry dashboard.
Within ten to thirty seconds a new error will appear — everything is working as expected.
Step 5. Configure alerts
Go to: Settings → Alerts → Create Alert
Choose the alert condition, for example:
- every new error,
- increase in error rate,
- errors for a specific release version.
Choose the delivery channel: Telegram, Slack, Microsoft Teams, Email or Webhook.
Step 6. How to track releases (bonus)
Release tracking lets you see which version contains the error, how many users are affected, and when the issue first appeared.
The simplest way is the official CLI:
curl -sL https://sentry.io/get-cli/ | bash
sentry-cli releases new $VERSION
sentry-cli releases finalize $VERSION
I recommend integrating this into CI/CD so it happens automatically.
How much Sentry costs (as of November 2025)
Free plan — Developer Plan
- 5,000 errors per month
- 5,000,000 spans for performance monitoring
This is more than enough for most pet projects and MVPs.
Paid plan — Team Plan
From $26 per month with annual billing.
Choose this when limits become tight or advanced features are required.
Summary
Connecting Sentry is one of the fastest ways to improve product quality. You:
- Sign up for the service.
- Add a few lines of code.
- Gain control over production.
You stop being afraid of messages from users like “nothing works for me”, because now you learn about problems first — and fix them before anyone gets upset.
Related reviews
As always, prompt and high-quality! I turn to Mikhail for server issues.
Vadim_U · Moving n8n to another server
An established customer2025-11-14 · ⭐ 5/5
As always, prompt and high-quality! For server-related issues, I turn to Mikhail.
Very pleased with working with Mikhail. Any task, even one that seems difficult at first, is executed to a high standard thanks to him! Thank you )
Dr-zelenin · VPS setup, server setup
2025-11-11 · ⭐ 5/5
Very satisfied with working with Mikhail. Any task, even one that seems difficult at first glance, becomes, thanks to him, implemented to a high standard! Thank you)
Thanks to Mikhail for his professionalism. I recommend him. He was very helpful in helping me understand Docker.
Vadim_U · VPS setup, server setup
A customer who has settled in2025-11-10 · ⭐ 5/5
Thanks to Mikhail for his professionalism. I recommend him. He was a great help in getting to grips with Docker.
Mikhail is an expert. He quickly figured it out and fixed the problem.
Vadim_U · VPS setup, server setup
An acclimated customer2025-11-10 · ⭐ 5/5
Mikhail is an expert. Quickly figured it out and resolved the issue.
Comes through for any problem — I recommend it!
AlekseiDotsenko · VPS setup, server setup
Power buyer2025-11-05 · ⭐ 5/5
Comes to the rescue with any problems, I recommend!
Mikhail helped set up the website very quickly. I would’ve definitely been fiddling with it all day. It’s great when a professional saves your time and delivers high-quality work. I recommend him!
N_Konstantin · VPS setup, server setup
An established customer2025-10-21 · ⭐ 5/5
Mikhail was very prompt in helping set up the website. I would definitely have been tinkering with it all day. It's nice when a professional helps save your time and does the work at a high level. I recommend him!