diff --git a/core/settings.py b/core/settings.py index 912e93d6d3226c15a82756cb816c190544a8e309..8d9a8be58edd321f1a22449830f81ee711f7c68b 100644 --- a/core/settings.py +++ b/core/settings.py @@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/4.1/ref/settings/ from os import environ from pathlib import Path +import sentry_sdk + env = environ # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -137,3 +139,13 @@ EMAIL_HOST = env.get("EMAIL_HOST") EMAIL_HOST_USER = env.get("EMAIL_USER") EMAIL_HOST_PASSWORD = env.get("EMAIL_PASSWORD") DEFAULT_FROM_EMAIL = env.get("FROM_EMAIL") + +ERROR_REPORTING = env.get("ERROR_REPORTING", False) +if ERROR_REPORTING and not DEBUG: + sentry_sdk.init( + dsn="https://1ea494bd0994743aed627c8dbf46183b@o4508272990093312.ingest.de.sentry.io/4508295867990096", + # of transactions for tracing. + traces_sample_rate=1.0, _experiments={ # Set continuous_profiling_auto_start to True + # to automatically start the profiler on when + # possible. + "continuous_profiling_auto_start": True, }, ) diff --git a/requirements.txt b/requirements.txt index dc2edb73e5c9bb499437c5064289678065289a06..9d59c123ee05da320dfb42132f520b0fca771708 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Django==5.1.3 -whitenoise==6.7.0 -gunicorn==22.0.0 \ No newline at end of file +whitenoise==6.8.2 +gunicorn==23.0.0 +sentry-sdk[django]==2.18.0