From 8243f44ef6b06045fc3ab780638ab3e4fe101aa1 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Wed, 11 Sep 2024 22:40:49 +0100 Subject: [PATCH] Enable Prisma tracing in Sentry --- lib/db/schema.prisma | 2 +- sentry.edge.config.ts | 2 ++ sentry.server.config.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/db/schema.prisma b/lib/db/schema.prisma index 17b79724..e39227e2 100644 --- a/lib/db/schema.prisma +++ b/lib/db/schema.prisma @@ -1,6 +1,6 @@ generator client { provider = "prisma-client-js" - previewFeatures = ["postgresqlExtensions"] + previewFeatures = ["postgresqlExtensions", "tracing"] } generator json { diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts index 26bf07bb..2e14ee63 100644 --- a/sentry.edge.config.ts +++ b/sentry.edge.config.ts @@ -16,6 +16,8 @@ Sentry.init({ // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, + integrations: [Sentry.prismaIntegration()], + beforeSend(event) { // Filter out errors during the Next.js build phase if (process.env.NEXT_PHASE === "phase-production-build") { diff --git a/sentry.server.config.ts b/sentry.server.config.ts index 45853c23..b2ad7ed7 100644 --- a/sentry.server.config.ts +++ b/sentry.server.config.ts @@ -15,6 +15,8 @@ Sentry.init({ // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, + integrations: [Sentry.prismaIntegration()], + beforeSend(event) { // Filter out errors during the Next.js build phase if (process.env.NEXT_PHASE === "phase-production-build") {