import * as Sentry from "@sentry/nextjs"; import { redactSentryEvent } from "@/lib/sentry-redact"; const dsn = process.env.SENTRY_DSN; if (dsn) { Sentry.init({ dsn, environment: process.env.NODE_ENV, release: process.env.APP_VERSION, tracesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0, enabled: process.env.NODE_ENV === "production", ignoreErrors: [ "Network request failed", "AbortError", "NEXT_REDIRECT", "NEXT_NOT_FOUND", ], beforeSend: redactSentryEvent, }); }