15 lines
424 B
TypeScript
15 lines
424 B
TypeScript
import * as Sentry from "@sentry/nextjs";
|
|
|
|
// Edge runtime initialization (route handlers / middleware in edge)
|
|
Sentry.init({
|
|
dsn: process.env.SENTRY_DSN || undefined,
|
|
tracesSampleRate: 0.2,
|
|
_experiments: {
|
|
enableLogs: true,
|
|
},
|
|
integrations: [
|
|
// send console.log, console.warn, and console.error calls as logs to Sentry
|
|
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
|
|
],
|
|
});
|