From ce2beb643b5d1d6c9188c45aa9e2ab99d58a2ae5 Mon Sep 17 00:00:00 2001 From: Horacio Herrera Date: Tue, 9 Jan 2024 11:16:55 +0100 Subject: [PATCH] sites: updating sentry config --- frontend/apps/site/next.config.js | 4 ++-- frontend/apps/site/sentry.client.config.ts | 3 +-- frontend/apps/site/sentry.edge.config.ts | 2 +- frontend/apps/site/sentry.server.config.ts | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/apps/site/next.config.js b/frontend/apps/site/next.config.js index 4021d9d87..503f183d9 100644 --- a/frontend/apps/site/next.config.js +++ b/frontend/apps/site/next.config.js @@ -141,7 +141,7 @@ module.exports = withSentryConfig( // https://github.com/getsentry/sentry-webpack-plugin#options // Suppresses source map uploading logs during build - silent: true, + silent: process.env.NODE_ENV == 'production', org: 'mintter', project: 'sites', }, @@ -162,6 +162,6 @@ module.exports = withSentryConfig( hideSourceMaps: true, // Automatically tree-shake Sentry logger statements to reduce bundle size - disableLogger: true, + disableLogger: process.env.NODE_ENV == 'development', }, ) diff --git a/frontend/apps/site/sentry.client.config.ts b/frontend/apps/site/sentry.client.config.ts index 308f37bb8..a09706ef6 100644 --- a/frontend/apps/site/sentry.client.config.ts +++ b/frontend/apps/site/sentry.client.config.ts @@ -1,11 +1,10 @@ // This file configures the initialization of Sentry on the client. // The config you add here will be used whenever a users loads a page in their browser. // https://docs.sentry.io/platforms/javascript/guides/nextjs/ - import * as Sentry from '@sentry/nextjs' if (process.env.NODE_ENV == 'production') { Sentry.init({ - dsn: process.env.HM_SENTRY_SITE_DSN, + dsn: process.env.HM_SENTRY_DESKTOP_DSN, // Adjust this value in production, or use tracesSampler for greater control tracesSampleRate: 1, diff --git a/frontend/apps/site/sentry.edge.config.ts b/frontend/apps/site/sentry.edge.config.ts index 5363e8dc3..3687432b0 100644 --- a/frontend/apps/site/sentry.edge.config.ts +++ b/frontend/apps/site/sentry.edge.config.ts @@ -13,7 +13,7 @@ if (process.env.NODE_ENV == 'production') { tracesSampleRate: 1, // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: true, + debug: false, }) } else { console.log( diff --git a/frontend/apps/site/sentry.server.config.ts b/frontend/apps/site/sentry.server.config.ts index c5dabcddc..f056f103f 100644 --- a/frontend/apps/site/sentry.server.config.ts +++ b/frontend/apps/site/sentry.server.config.ts @@ -12,7 +12,7 @@ if (process.env.NODE_ENV == 'production') { tracesSampleRate: 1, // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: true, + debug: false, }) } else { console.log(