From 6f40a55b1373b7931155f771c555373ab419f24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kol=C3=A1=C5=99?= Date: Wed, 18 Sep 2024 23:19:59 +0200 Subject: [PATCH] chore(sentry): send PII, increase rates a bit, include cache spans --- fiesta/fiesta/settings/logging.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/fiesta/fiesta/settings/logging.py b/fiesta/fiesta/settings/logging.py index 8fa75971..bb18fdf3 100644 --- a/fiesta/fiesta/settings/logging.py +++ b/fiesta/fiesta/settings/logging.py @@ -1,6 +1,7 @@ from __future__ import annotations from configurations.values import SecretValue, Value +from sentry_sdk.integrations.django import DjangoIntegration class LoggingConfigMixin: @@ -76,10 +77,20 @@ def post_setup(cls): if cls.SENTRY_DSN: sentry_sdk.init( dsn=cls.SENTRY_DSN, - # sample only 10% of events to reduce incoming data - traces_sample_rate=0.1, - profiles_sample_rate=0.1, + # sample only 50 % of events to reduce incoming data + # currently about 6M spans per peak month + traces_sample_rate=0.5, + profiles_sample_rate=0.5, environment=cls.ENVIRONMENT_NAME, release=cls.RELEASE_NAME, enable_tracing=True, + send_default_pii=True, + auto_enabling_integrations=True, + auto_session_tracking=True, + integrations=[ + DjangoIntegration( + # include spans from caches + cache_spans=True, + ), + ], )