From 79148db0916ce271360b9b1b4c86a907f21e4f28 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 29 Jun 2022 09:21:47 +0200 Subject: [PATCH] Hide Sentry DSN in a envvar --- sentry.client.config.js | 4 ++-- sentry.server.config.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sentry.client.config.js b/sentry.client.config.js index 838ed54..3a7cde1 100644 --- a/sentry.client.config.js +++ b/sentry.client.config.js @@ -4,10 +4,10 @@ import * as Sentry from '@sentry/nextjs'; -const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN; +const dsn = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN; Sentry.init({ - dsn: "https://8ff38639de2c49f39773a49864c6e775@o40131.ingest.sentry.io/6185233", + dsn, // Adjust this value in production, or use tracesSampler for greater control tracesSampleRate: 1.0, // ... diff --git a/sentry.server.config.js b/sentry.server.config.js index d8adb03..16c972a 100644 --- a/sentry.server.config.js +++ b/sentry.server.config.js @@ -4,10 +4,10 @@ import * as Sentry from '@sentry/nextjs'; -const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN; +const dsn = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN; Sentry.init({ - dsn: "https://8ff38639de2c49f39773a49864c6e775@o40131.ingest.sentry.io/6185233", + dsn, // Adjust this value in production, or use tracesSampler for greater control tracesSampleRate: 1.0, // ...