feat : add sentry

This commit is contained in:
GuillaumeSD
2024-12-29 17:24:21 +01:00
parent d5a1a03ffd
commit 011a1c21bf
8 changed files with 2688 additions and 65 deletions

22
sentry.client.config.ts Normal file
View File

@@ -0,0 +1,22 @@
import * as Sentry from "@sentry/nextjs";
if (
process.env.NEXT_PUBLIC_SENTRY_DSN &&
document.location.hostname !== "localhost"
) {
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
environment: "production",
integrations: [
Sentry.replayIntegration({
maskAllText: false,
maskAllInputs: false,
blockAllMedia: false,
}),
],
tracesSampleRate: 1,
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
debug: false,
});
}