/**
 * Sentry Edge Configuration
 *
 * Configures Sentry for edge runtime (middleware, edge API routes).
 * Loaded via instrumentation.ts when NEXT_RUNTIME === 'edge'.
 *
 * To enable: set SENTRY_DSN in .env.local
 * Without the DSN, this file is a no-op.
 */

import * as Sentry from "@sentry/nextjs";

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;

if (SENTRY_DSN) {
  Sentry.init({
    dsn: SENTRY_DSN,

    // Only enable in production
    enabled: process.env.NODE_ENV === "production",

    // Environment tag
    environment: process.env.NODE_ENV || "development",

    // Performance Monitoring - sample 10% of transactions
    tracesSampleRate: 0.1,
  });
}

export {};
