From a88030e12a2c926d738718faec20ffa435de1161 Mon Sep 17 00:00:00 2001 From: Brian Muenzenmeyer Date: Thu, 16 Nov 2023 04:11:39 -0600 Subject: [PATCH] tune sentry collection rates per docs (#6121) --- sentry.client.config.ts | 8 ++++---- sentry.edge.config.ts | 4 ++-- sentry.server.config.ts | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sentry.client.config.ts b/sentry.client.config.ts index 43f06ac225b1d..e6224bf4cfdd4 100644 --- a/sentry.client.config.ts +++ b/sentry.client.config.ts @@ -7,12 +7,12 @@ init({ enabled: !!VERCEL_ENV, // Tell Sentry where to send events dsn: SENTRY_DSN, - // Percentage of events to send to Sentry (all of them) (for performance metrics) - tracesSampleRate: 1, + // Percentage of events to send to Sentry (1% of them) (for performance metrics) + tracesSampleRate: 0.01, + // Percentage of sessions to sample (1%) + replaysSessionSampleRate: 0.01, // Percentage of errors to sample (all of them) 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 diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts index 356da766b405f..55317104b0c85 100644 --- a/sentry.edge.config.ts +++ b/sentry.edge.config.ts @@ -7,6 +7,6 @@ init({ enabled: !!VERCEL_ENV, // Tell Sentry where to send events dsn: SENTRY_DSN, - // Percentage of events to send to Sentry (all of them) (for performance metrics) - tracesSampleRate: 1, + // Percentage of events to send to Sentry (1% of them) (for performance metrics) + tracesSampleRate: 0.01, }); diff --git a/sentry.server.config.ts b/sentry.server.config.ts index 444bd851e8962..ac57325c76512 100644 --- a/sentry.server.config.ts +++ b/sentry.server.config.ts @@ -8,9 +8,10 @@ init({ enabled: !!VERCEL_ENV, // Tell Sentry where to send events dsn: SENTRY_DSN, - // Percentage of events to send to Sentry (all of them) (for performance metrics) - tracesSampleRate: 1, + // Percentage of events to send to Sentry (1% of them) (for performance metrics) + tracesSampleRate: 0.01, // Percentage of events to send to Sentry (all of them) (for profiling metrics) + // This number is relative to tracesSampleRate - so all traces get profiled profilesSampleRate: 1.0, // Add profiling integration to capture performance metrics integrations: [new ProfilingIntegration()],