EvoCalculator.Client2/apps/web/sentry.edge.config.js
2024-02-23 12:47:12 +03:00

21 lines
687 B
JavaScript

// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever middleware or an Edge route handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import getUrls from './config/urls';
import { publicRuntimeConfigSchema } from '@/config/schema/runtime-config';
import { init } from '@sentry/nextjs';
import getConfig from 'next/config';
const { SENTRY_DSN } = getUrls();
const { publicRuntimeConfig } = getConfig();
const { SENTRY_ENVIRONMENT } = publicRuntimeConfigSchema.parse(publicRuntimeConfig);
init({
debug: false,
dsn: SENTRY_DSN,
environment: SENTRY_ENVIRONMENT,
tracesSampleRate: 1,
});