diff --git a/Dockerfile b/Dockerfile index ffee6dfed555ff1e1cfe56e9b3b3cadc6ed16131..e663765c96a0661a721a5888e1f90cdf2ed6980d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12 +FROM python:3.13 WORKDIR /app COPY requirements.txt requirements.txt 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 5d9ea5c4783d2d12fa9cc8a25a934d92c59be72b..9d59c123ee05da320dfb42132f520b0fca771708 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -Django==5.0.6 -whitenoise==6.6.0 -gunicorn==22.0.0 \ No newline at end of file +Django==5.1.3 +whitenoise==6.8.2 +gunicorn==23.0.0 +sentry-sdk[django]==2.18.0