16 lines
382 B
TypeScript
16 lines
382 B
TypeScript
import * as Sentry from '@sentry/nextjs';
|
|
import { sentrySharedOptions } from '@/lib/error-tracking/sentrySharedOptions';
|
|
|
|
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN?.trim();
|
|
|
|
if (dsn) {
|
|
Sentry.init({
|
|
dsn,
|
|
environment:
|
|
process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT?.trim() ||
|
|
process.env.NODE_ENV ||
|
|
'development',
|
|
...sentrySharedOptions(),
|
|
});
|
|
}
|