// This file configures the initialization of Sentry on the browser. // The config you add here will be used whenever a page is visited. // https://docs.sentry.io/platforms/javascript/guides/nextjs/ import getUrls from './config/urls'; import { publicRuntimeConfigSchema } from '@/config/schema/runtime-config'; import { init, replayIntegration } 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, integrations: [ replayIntegration({ blockAllMedia: true, maskAllText: false, }), ], replaysOnErrorSampleRate: 1, replaysSessionSampleRate: 0.1, tracesSampleRate: 1, });