21 lines
670 B
JavaScript
21 lines
670 B
JavaScript
// 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 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,
|
|
});
|