From 8caad28ef0f52dce1e48f27e37e8acca9b9121f2 Mon Sep 17 00:00:00 2001 From: delivan Date: Tue, 20 Dec 2022 22:39:23 +0900 Subject: [PATCH] Update sentry config --- next.config.js | 7 +++---- sentry.client.config.js | 7 ++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/next.config.js b/next.config.js index 7056324..3b09aa4 100644 --- a/next.config.js +++ b/next.config.js @@ -41,7 +41,6 @@ const sentryWebpackPluginOptions = { silent: true, }; -module.exports = - process.env.NEXT_IS_ENABLE_USER_TRACKING === "true" - ? withSentryConfig(nextConfig, sentryWebpackPluginOptions) - : nextConfig; +module.exports = !!process.env.NEXT_PUBLIC_SENTRY_DSN + ? withSentryConfig(nextConfig, sentryWebpackPluginOptions) + : nextConfig; diff --git a/sentry.client.config.js b/sentry.client.config.js index 5ca9c13..82de681 100644 --- a/sentry.client.config.js +++ b/sentry.client.config.js @@ -5,13 +5,10 @@ import * as Sentry from "@sentry/nextjs"; const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; -const IS_ENABLE_USER_TRACKING = process.env.NEXT_PUBLIC_IS_ENABLE_USER_TRACKING; Sentry.init({ - enabled: IS_ENABLE_USER_TRACKING === "true", - dsn: - SENTRY_DSN || - "https://78c91641e90f4f7cad28f50aaec9fb95@o4504343701946368.ingest.sentry.io/4504343708827648", + enabled: !!SENTRY_DSN, + dsn: SENTRY_DSN, // Adjust this value in production, or use tracesSampler for greater control tracesSampleRate: 1.0, // ...