From 0cda94f2c35875f74e5df169974d5fe7123c01bd Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Sat, 10 Feb 2024 12:20:23 +0530 Subject: [PATCH] chore: add default value --- apps/api/src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 82866ba8..8ee866c0 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -47,7 +47,7 @@ class CustomLogger implements LoggerService { async function bootstrap() { Sentry.init({ dsn: process.env.SENTRY_DSN, - environment: process.env.NODE_ENV, + environment: process.env.NODE_ENV || 'development', tracesSampleRate: Number(process.env.SENTRY_TRACES_SAMPLE_RATE) || 1.0, profilesSampleRate: Number(process.env.SENTRY_PROFILES_SAMPLE_RATE) || 1.0, integrations: [new ProfilingIntegration()], @@ -65,6 +65,7 @@ async function bootstrap() { }) app.use(Sentry.Handlers.requestHandler()) app.use(Sentry.Handlers.tracingHandler()) + const globalPrefix = 'api' app.setGlobalPrefix(globalPrefix) app.useGlobalPipes(