// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs"

const isProduction = process.env.NODE_ENV === "production"

Sentry.init({
  dsn: isProduction
    ? "https://0fa0f40b2d709e4f1eb9aac76ff9e6be@o4506833230561280.ingest.us.sentry.io/4506833279582208"
    : undefined,

  tracesSampleRate: isProduction ? 0.1 : 1,

  // Let the custom OTel setup in src/instrumentation.ts manage OpenTelemetry
  skipOpenTelemetrySetup: true,

  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false,
})
