From c5a190c8c4dc893a2c98464f448238866b27d26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20G=C3=A9r=C3=B4me?= Date: Thu, 4 Nov 2021 21:00:04 +0000 Subject: [PATCH] chore(Sentry): Get trace sample rate from env --- openIMIS/openIMIS/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openIMIS/openIMIS/settings.py b/openIMIS/openIMIS/settings.py index 62903a8b..d80a966f 100644 --- a/openIMIS/openIMIS/settings.py +++ b/openIMIS/openIMIS/settings.py @@ -71,6 +71,7 @@ } SENTRY_DSN = os.environ.get("SENTRY_DSN", None) +SENTRY_SAMPLE_RATE = os.environ.get("SENTRY_SAMPLE_RATE", 0.2) IS_SENTRY_ENABLED = False if SENTRY_DSN is not None: @@ -84,7 +85,7 @@ # Set traces_sample_rate to 1.0 to capture 100% # of transactions for performance monitoring. # We recommend adjusting this value in production, - traces_sample_rate=1.0, + traces_sample_rate=SENTRY_SAMPLE_RATE, # If you wish to associate users to errors (assuming you are using # django.contrib.auth) you may enable sending PII data. send_default_pii=True,