add release version to sentry ci process

This commit is contained in:
Amruth Pillai
2022-12-02 23:16:48 +01:00
parent e36fbb5f64
commit ea2aee2d25
9 changed files with 917 additions and 7 deletions

View File

@ -1,12 +1,15 @@
import env from '@beam-australia/react-env';
import * as Sentry from '@sentry/nextjs';
import packageJSON from '../package.json';
const SENTRY_DSN = env('CLIENT_SENTRY_DSN');
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 1.0,
release: packageJSON.version,
enabled: process.env.NODE_ENV === 'production',
});
}