Files
decomp.me/frontend/sentry.server.config.ts
Mark Street 515f9e97f4 Enable sentry.io in frontend (#1607)
* Enable sentry.io in frontend

* Skip housekeeping.py when running in CI

* tweaks

* remove .yarn/install-state.gz
2025-06-15 08:30:42 +01:00

16 lines
395 B
TypeScript

import { init } from "@sentry/nextjs";
const isSentryEnabled = !!process.env.NEXT_PUBLIC_SENTRY_DSN;
if (isSentryEnabled) {
init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: Number.parseFloat(
process.env.NEXT_PUBLIC_SENTRY_SERVER_SAMPLE_RATE ?? "0.1",
),
debug: false,
});
} else {
console.log("Sentry is disabled.");
}