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.
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',
|
2021-11-10 07:24:21 +00:00
|
|
|
release:
|
|
|
|
'zdam-egzamin-zawodowy-website@' +
|
|
|
|
(process.env.NEXT_PUBLIC_VERSION ?? 'development'),
|
2021-11-04 08:23:45 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
initSentry();
|