From 43fba8865b82f8857cd571c58bf3864a2708c60d Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 11 Apr 2024 16:33:03 +0200 Subject: [PATCH] feat: added sentry env --- api/src/app.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/api/src/app.ts b/api/src/app.ts index 7e570880..bb892b80 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -20,6 +20,7 @@ export const createApp = (): { app: Express, router: express.Router } => { if (process.env.SENTRY_DSN) { Sentry.init({ dsn: process.env.SENTRY_DSN, + environment: process.env.SENTRY_ENV ?? 'dev', integrations: [ nodeProfilingIntegration(), new Sentry.Integrations.Express({ @@ -33,21 +34,6 @@ export const createApp = (): { app: Express, router: express.Router } => { app.use(Sentry.Handlers.tracingHandler()); } - if (process.env.SENTRY_DSN) { - Sentry.init({ - dsn: process.env.SENTRY_DSN, - integrations: [ - nodeProfilingIntegration(), - new Sentry.Integrations.Express({ - app, - }), - ], - tracesSampleRate: 1.0, - }); - - app.use(Sentry.Handlers.requestHandler()); - app.use(Sentry.Handlers.tracingHandler()); - } app.get('/healthz', async (_req, res) => { try { await basePrisma.user.findFirst();