diff --git a/next.config.mjs b/next.config.mjs index 1d7bb8554bceb..59abc0cdc3486 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -81,7 +81,7 @@ export default withSentryConfig( // transpile the Sentry code too since we target older browsers in our .browserslistrc transpileClientSDK: true, // attempt to circumvent ad blockers - tunnelRoute: '/monitoring', + tunnelRoute: ENABLE_STATIC_EXPORT ? undefined : '/monitoring', // prevent source map comments in built files hideSourceMaps: false, disableLogger: true, diff --git a/sentry.client.config.ts b/sentry.client.config.ts index f70d0c6dc6c90..fb45ff3f6072a 100644 --- a/sentry.client.config.ts +++ b/sentry.client.config.ts @@ -11,5 +11,9 @@ init({ replaysOnErrorSampleRate: 1.0, // percentage of sessionsto sample (10%) replaysSessionSampleRate: 0.1, + // support replaying client sessions to capture unhappy paths integrations: [new Replay()], + // we only want to capture errors from _next folder on production + // we don't want to capture errors from preview branches here + allowUrls: ['https://nodejs.org/_next'], });