Sentry

To use Sentry to capture exceptions and performance metrics of your app, please define the below variables:

NEXT_PUBLIC_MONITORING_PROVIDER=sentry NEXT_PUBLIC_SENTRY_DSN=your_dsn

Please install the package @sentry/nextjs in apps/web/package.json as a dependency.

pnpm i @sentry/nextjs --filter web

Finally, update the Next.js configuration in your next.config.js file:

next.config.mjs
import { withSentryConfig } from '@sentry/nextjs'; // wrap your Next.js configuration with the Sentry configuration withSentryConfig(nextConfig);

If you also want to enable OpenTelemetry, you can set the following variables:

ENABLE_MONITORING_INSTRUMENTATION=true

Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS