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, silent: true,
}; };
module.exports = module.exports = !!process.env.NEXT_PUBLIC_SENTRY_DSN
process.env.NEXT_IS_ENABLE_USER_TRACKING === "true" ? withSentryConfig(nextConfig, sentryWebpackPluginOptions)
? withSentryConfig(nextConfig, sentryWebpackPluginOptions) : nextConfig;
: nextConfig;

View File

@ -5,13 +5,10 @@
import * as Sentry from "@sentry/nextjs"; import * as Sentry from "@sentry/nextjs";
const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
const IS_ENABLE_USER_TRACKING = process.env.NEXT_PUBLIC_IS_ENABLE_USER_TRACKING;
Sentry.init({ Sentry.init({
enabled: IS_ENABLE_USER_TRACKING === "true", enabled: !!SENTRY_DSN,
dsn: dsn: SENTRY_DSN,
SENTRY_DSN ||
"https://78c91641e90f4f7cad28f50aaec9fb95@o4504343701946368.ingest.sentry.io/4504343708827648",
// Adjust this value in production, or use tracesSampler for greater control // Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0, tracesSampleRate: 1.0,
// ... // ...