From 134d64c5c0c46a5da002fb0673b01b2f4494715c Mon Sep 17 00:00:00 2001 From: Bomme <13520622+Bomme@users.noreply.github.com> Date: Tue, 31 Oct 2023 23:19:33 +0100 Subject: [PATCH] enable sentry transaction sampling https://docs.sentry.io/platforms/python/configuration/sampling/ --- freesound/settings.py | 4 ++-- requirements.in | 2 +- requirements.txt | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/freesound/settings.py b/freesound/settings.py index a59a4c889..420feba3f 100644 --- a/freesound/settings.py +++ b/freesound/settings.py @@ -900,9 +900,9 @@ if SENTRY_DSN: sentry_sdk.init( dsn=SENTRY_DSN, - default_integrations=False, integrations=[DjangoIntegration()], - send_default_pii=True + send_default_pii=True, + traces_sample_rate=0.1, ) diff --git a/requirements.in b/requirements.in index 3551e7bea..f4541291b 100644 --- a/requirements.in +++ b/requirements.in @@ -46,7 +46,7 @@ pysndfile==1.4.4 pytz==2023.3 PyYAML==6.0.1 redis==3.2.0 -sentry-sdk~=1.31 +sentry-sdk[django]~=1.31 Sphinx==1.6.3 stripe==2.28.1 xlrd==2.0.1 # for reading .xls files (but not .xlsx) diff --git a/requirements.txt b/requirements.txt index 671647339..4f4f2a1b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -99,6 +99,7 @@ django==3.2.17 # django-redis # django-silk # djangorestframework + # sentry-sdk django-admin-sortable==2.2.4 # via -r requirements.in django-amazon-ses==4.0.1 @@ -281,7 +282,7 @@ requests==2.31.0 # zenpy s3transfer==0.6.1 # via boto3 -sentry-sdk==1.31.0 +sentry-sdk[django]==1.31.0 # via -r requirements.in sgmllib3k==1.0.0 # via feedparser