This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
website/sentry.server.config.ts

20 lines
386 B
TypeScript
Raw Normal View History

2021-11-04 08:23:45 +00:00
import * as Sentry from '@sentry/nextjs';
const initSentry = () => {
const SENTRY_DSN =
process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
if (!SENTRY_DSN) {
return;
}
Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 0.3,
2021-11-06 09:42:02 +00:00
environment: process.env.NODE_ENV ?? 'development',
release: process.env.NEXT_PUBLIC_VERSION,
2021-11-04 08:23:45 +00:00
});
};
initSentry();