import * as Sentry from '@sentry/node';

Sentry.init({
  dsn: 'https://facfb227086a42bab7f02fed0c7e6b98@o4504950919921664.ingest.sentry.io/4504950924312576',

  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for performance monitoring.
  // We recommend adjusting this value in production
  tracesSampleRate: 1.0,
  sampleRate: 1.0,

  enabled: process.env.ENVIRONMENT !== 'development',
  environment: process.env.ENVIRONMENT,
  release: process.env.RELEASE,
  ignoreErrors: [
    'APIUserAbortError', // openAI throws this unavoidably after a user closes a connection. we handle this case correctly, so shouldn't show up in sentry.
  ],
});

export default Sentry;
