From 8caeb95c399f3a173ed35b9f769a3696574b0b92 Mon Sep 17 00:00:00 2001 From: Nigel Breslaw Date: Thu, 28 Mar 2024 11:21:49 +0200 Subject: [PATCH] refactor(sentry): Teach sentry to do less in production (#1018) --- native/app/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/native/app/index.js b/native/app/index.js index f8da9b8fc..8b31d06c7 100644 --- a/native/app/index.js +++ b/native/app/index.js @@ -9,15 +9,12 @@ const routingInstrumentation = new Sentry.ReactNavigationInstrumentation({ Sentry.init({ dsn: "https://7db2c06ee6ea56cae40a5bd963bad76b:7d7182201a659982c7b30a4512d4ad7a@o4506899216728065.ingest.us.sentry.io/4506899221970944", - // Set tracesSampleRate to 1.0 to capture 100% - // of transactions for performance monitoring. - // We recommend adjusting this value in production - tracesSampleRate: 1.0, + // Capture 100% of transactions in development, and 10% in production + tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1, enabled: process.env.NODE_ENV !== "development", integrations: [new Sentry.ReactNativeTracing({ routingInstrumentation })], _experiments: { // profilesSampleRate is relative to tracesSampleRate. - // Here, we'll capture profiles for 100% of transactions. profilesSampleRate: 1.0, }, });