Files
frontend/apps/as/sentry.server.config.ts
T

15 lines
479 B
TypeScript

import * as Sentry from "@sentry/nextjs";
const isSentryEnabled =
process.env.NEXT_PUBLIC_SENTRY_ENABLED === "true" &&
process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT !== "dev" &&
process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT !== "prd";
Sentry.init({
enabled: isSentryEnabled,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT ?? "local",
tracesSampleRate: 1.0,
debug: process.env.NEXT_PUBLIC_SENTRY_DEBUG === "true",
});