// Next.js server instrumentation entry point. A no-op when NEXT_PUBLIC_SENTRY_DSN isn't // set — see instrumentation-client.ts for the browser-side counterpart. // // Node runtime only — the app has no middleware/proxy running in the edge runtime. export async function register() { if (!process.env.NEXT_PUBLIC_SENTRY_DSN) return; if (process.env.NEXT_RUNTIME !== "nodejs") return; const Sentry = await import("@sentry/nextjs"); Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, environment: process.env.NODE_ENV || "development", tracesSampleRate: 0.1, }); }