Update sentry config

This commit is contained in:
delivan 2022-12-20 22:39:23 +09:00
parent 5a36f96c9e
commit 8caad28ef0
2 changed files with 5 additions and 9 deletions

View File

@ -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;

View File

@ -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,
// ...