import * as Sentry from '@sentry/nextjs'; const dsn = process.env.SENTRY_DSN; Sentry.init({ dsn, enabled: Boolean(dsn), tracesSampleRate: 0, // Ensure 500 errors are always captured // Next.js 14+ with App Router handles many errors automatically, // but we want to be explicit about capturing all unhandled exceptions. debug: process.env.NODE_ENV === 'development', });