From 61318f291a9777d57674a9610c078d353869a0d9 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sat, 19 Aug 2023 08:25:12 +0900 Subject: [PATCH] Add: Add tracesSampleRate for frontend --- backend/config/initializers/sentry.rb | 2 +- frontend/sentry.client.config.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/config/initializers/sentry.rb b/backend/config/initializers/sentry.rb index 9b6ff6b..3b6f3e5 100644 --- a/backend/config/initializers/sentry.rb +++ b/backend/config/initializers/sentry.rb @@ -7,6 +7,6 @@ config.dsn = ENV["SENTRY_DSN_BACKEND"] config.breadcrumbs_logger = [:active_support_logger] - config.traces_sample_rate = Rails.env.production? ? 0.2 : 1.0 + config.traces_sample_rate = Rails.env.production? ? 0.1 : 1.0 end end diff --git a/frontend/sentry.client.config.ts b/frontend/sentry.client.config.ts index 6f62a74..d5548dd 100644 --- a/frontend/sentry.client.config.ts +++ b/frontend/sentry.client.config.ts @@ -7,5 +7,7 @@ if (publicRuntimeConfig.sentryDsnFrontend) { Sentry.init({ dsn: publicRuntimeConfig.sentryDsnFrontend, integrations: [new Sentry.Replay()], + + tracesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0, }) }