Step 1: Install the Sentry SDK
- Node.js
- NestJS
- Django
- FastAPI
- Flask
Step 2: Initialize Sentry
Add this at the very top of your entry file, before any other imports:- Express/Fastify/Koa
- NestJS
- Django
- FastAPI
- Flask
Step 3: Enable CORS for Session Header
Make sure your backend allows thex-sonarly-session-id header:
- Express
- FastAPI
- Django
DSN Format
Your DSN can be found in the Sonarly dashboard. It follows this format:Verify
After deploying, check that:- Backend errors appear in your Sonarly dashboard
- Errors are linked to frontend sessions (you’ll see the session replay)
- Traces show the full request flow
View AI Alerts
Get notified about critical issues automatically

