debats/instrumentation-client.ts
Jalil Arfaoui 0047c7d840 feat: installer Sentry pour le monitoring d'erreurs
Sentry est actif uniquement en production (DSN absent en dev → SDK inerte).
Capture automatique des erreurs Server Components, server actions,
middleware (via onRequestError) et côté client (error boundary global).
2026-02-18 12:01:08 +01:00

11 lines
313 B
TypeScript

import * as Sentry from '@sentry/nextjs'
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 0,
integrations: [Sentry.replayIntegration()],
})
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart