The app is now wired to GlitchTip with the Sentry SDKs
This commit is contained in:
15
frontend/src/lib/error-tracking/sentry.server.config.ts
Normal file
15
frontend/src/lib/error-tracking/sentry.server.config.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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(),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user