From d51b063918c574fc62aba3d0ee1beb02b53d4ecf Mon Sep 17 00:00:00 2001 From: Spacelord Date: Mon, 15 May 2023 22:57:00 +0200 Subject: [PATCH] Added Sentry prisma integration --- src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index c88dd3c..c80b335 100644 --- a/src/index.ts +++ b/src/index.ts @@ -54,13 +54,16 @@ Sentry.init({ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // enable Express.js middleware tracing - new Tracing.Integrations.Express({ app }) + new Tracing.Integrations.Express({ app }), + // @ts-ignore + new Sentry.Integrations.Prisma({ prisma }) ], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production - tracesSampleRate: 1.0 + tracesSampleRate: config.global.debug ? 1.0 : 0.5, + environment: config.global.debug ? 'development' : 'production' }); // RequestHandler creates a separate execution context using domains, so that every