import * as Sentry from "@sentry/nextjs"; export function register() { if (process.env.NEXT_RUNTIME === "nodejs") { Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, // reduce sample rate to 10% on production tracesSampleRate: process.env.NODE_ENV !== "production" ? 1.0 : 0.1, }); } if (process.env.NEXT_RUNTIME === "edge") { Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, }); } }