From b3e14be6ed7718f9097d994afd34fe073612da77 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 18 May 2021 11:02:16 +0200 Subject: [PATCH] Upgrade sentry-sdk, support performance monitoring --- doc/admin/config.rst | 4 ++++ src/pretix/settings.py | 1 + src/requirements/production.txt | 2 +- src/setup.py | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/admin/config.rst b/doc/admin/config.rst index 78dee6580..dfc4160e2 100644 --- a/doc/admin/config.rst +++ b/doc/admin/config.rst @@ -350,10 +350,14 @@ application. If you want to use sentry, you need to set a DSN in the configurati [sentry] dsn=https://:@sentry.io/ + traces_sample_rate=0.5 ``dsn`` You will be given this value by your sentry installation. +``traces_sample_rate`` + Sample rate for performance monitoring. + Caching ------- diff --git a/src/pretix/settings.py b/src/pretix/settings.py index 0f0326181..147bb4f20 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -723,6 +723,7 @@ if config.has_option('sentry', 'dsn') and not any(c in sys.argv for c in ('shell event_level=logging.CRITICAL ) ], + traces_sample_rate=config.getfloat('sentry', 'traces_sample_rate', fallback=0.0), environment=urlparse(SITE_URL).netloc, release=__version__, send_default_pii=False, diff --git a/src/requirements/production.txt b/src/requirements/production.txt index 4cdb92696..0f965ad12 100644 --- a/src/requirements/production.txt +++ b/src/requirements/production.txt @@ -33,7 +33,7 @@ csscompressor django-markup markdown==3.3.* bleach==3.3.* -sentry-sdk==0.14.* +sentry-sdk==1.1.* babel django-i18nfield==1.9.*,>=1.9.1 django-hijack>=2.1.10,<2.2.0 diff --git a/src/setup.py b/src/setup.py index e48a77cca..375bf4328 100644 --- a/src/setup.py +++ b/src/setup.py @@ -182,7 +182,7 @@ setup( 'django-markup', 'markdown==3.3.*', 'bleach==3.3.*', - 'sentry-sdk==0.14.*', + 'sentry-sdk==1.1.*', 'babel', 'paypalrestsdk==1.13.*', 'pycparser==2.13',