From 520d9ebc0eabfb2864df0134fbb21e1f294eb444 Mon Sep 17 00:00:00 2001 From: phzhik Date: Thu, 9 Nov 2023 17:19:18 +0400 Subject: [PATCH] * Disable Sentry for debug environment --- poizonstore/settings.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/poizonstore/settings.py b/poizonstore/settings.py index 3abd5f1..10660e6 100644 --- a/poizonstore/settings.py +++ b/poizonstore/settings.py @@ -201,13 +201,14 @@ COMMISSION_OVER_150K = 1.1 # Logging SENTRY_DSN = "https://96106e3f938badc86ecb2e502716e496@o4506163299418112.ingest.sentry.io/4506163300663296" -sentry_sdk.init( - dsn=SENTRY_DSN, - # Set traces_sample_rate to 1.0 to capture 100% - # of transactions for performance monitoring. - traces_sample_rate=1.0, - # Set profiles_sample_rate to 1.0 to profile 100% - # of sampled transactions. - # We recommend adjusting this value in production. - profiles_sample_rate=1.0, -) +if not DEBUG: + sentry_sdk.init( + dsn=SENTRY_DSN, + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for performance monitoring. + traces_sample_rate=1.0, + # Set profiles_sample_rate to 1.0 to profile 100% + # of sampled transactions. + # We recommend adjusting this value in production. + profiles_sample_rate=1.0, + )