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

if (config.errors.glitchtip.enabled) {
  Sentry.init({
    dsn: config.errors.glitchtip.dsn,
    tracesSampleRate: 0.1,
    debug: config.isDevelopment,
    environment: config.target || "production",
    // Use the proxy path defined in config
    tunnel: config.errors.glitchtip.proxyPath,
  });
}
