Skip to main content
Monitoring helps you see production errors after your app is live. In this repo, Sentry is optional and only turns on when you provide a DSN.

What Sentry Does

Sentry can help you:
  • see frontend and backend errors
  • inspect stack traces
  • track runtime problems after deployment
If you do not configure it, the app still works normally.

Minimum Setup

This is enough to enable Sentry:
NEXT_PUBLIC_SENTRY_DSN=https://[email protected]/0
You can also set:
SENTRY_DSN=https://[email protected]/0
If SENTRY_DSN is missing, the repo can fall back to NEXT_PUBLIC_SENTRY_DSN.

Optional Build-Time Source Maps

These are only needed if you want nicer production stack traces:
SENTRY_AUTH_TOKEN=...
SENTRY_ORG=...
SENTRY_PROJECT=...

Optional Runtime Tuning

NEXT_PUBLIC_SENTRY_ENVIRONMENT=production
SENTRY_ENVIRONMENT=production
NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE=0.1
SENTRY_TRACES_SAMPLE_RATE=0.1

Setup Flow

  1. Create a Sentry project
  2. Copy the DSN
  3. Add it to .env.local or production env vars
  4. Restart the app locally or redeploy in production
  5. Trigger a test error and confirm Sentry receives it

Verification Checklist

Your Sentry setup is working if:
  • the app still builds normally
  • Sentry initializes when a DSN is set
  • a test error appears in your Sentry project

Common Mistakes

  • adding the DSN but forgetting to redeploy
  • expecting source maps without setting the source map env vars
  • using the wrong Sentry project