file-browser/sentry.server.config.ts

15 lines
382 B
TypeScript

import * as Sentry from "@sentry/nextjs";
// Server runtime initialization
Sentry.init({
dsn: process.env.SENTRY_DSN || undefined,
tracesSampleRate: 0.2,
_experiments: {
enableLogs: true,
},
integrations: [
// Capture console logs as structured logs in Sentry (info/warn/error)
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
],
});