Skip to content

Commit

Permalink
chore: add enabled check for sentry
Browse files Browse the repository at this point in the history
* it will not be enabled for `test` and `e2e`enviorment
  • Loading branch information
HarshPatel5940 committed Feb 10, 2024
1 parent 0cda94f commit fc11cf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class CustomLogger implements LoggerService {
async function bootstrap() {
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV || 'development',
enabled: process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'e2e',
environment: process.env.NODE_ENV,
tracesSampleRate: Number(process.env.SENTRY_TRACES_SAMPLE_RATE) || 1.0,
profilesSampleRate: Number(process.env.SENTRY_PROFILES_SAMPLE_RATE) || 1.0,
integrations: [new ProfilingIntegration()],
Expand Down

0 comments on commit fc11cf9

Please sign in to comment.