import * as Sentry from "@sentry/nextjs";
import { config } from "./lib/config";

if (config.errors.glitchtip.enabled) {
  console.log("Initializing Sentry in Edge runtime...", {
    environment: config.target || "production",
  });
  Sentry.init({
    dsn: config.errors.glitchtip.dsn,
    tracesSampleRate: 1.0,
    debug: true, // Force debug for now to see why it's failing
    environment: config.target || "production",
  });
} else {
  console.warn("Sentry is DISABLED in Edge runtime (missing DSN)");
}
