From 9a02d82cbc53cdb6da74e0645902bfc1c9cd747a Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Thu, 4 Apr 2024 11:03:45 +0200 Subject: [PATCH 1/3] Added sentry (and sorted the list) --- requirements.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 175217d..f02074c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,24 +2,25 @@ --extra-index-url https://packages.lizard.net # TODO: dependencies +celery django == 5.0.1 -psycopg2-binary -djangorestframework django-cors-headers +django-encrypted-model-fields +django-filter +djangorestframework drf-yasg -celery -redis flower -requests markdown +nens-auth-client +psycopg2-binary pytest pytest-django -xmltodict python-dotenv -django-encrypted-model-fields -django-filter -nens-auth-client +redis +requests +sentry-sdk[django] whitenoise +xmltodict # development tools ruff From e5dc594382f04da3c2d0586f23063ccbecec3f30 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Thu, 4 Apr 2024 11:09:09 +0200 Subject: [PATCH 2/3] Added sentry --- brostar_api/settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brostar_api/settings.py b/brostar_api/settings.py index 340128b..9c13064 100644 --- a/brostar_api/settings.py +++ b/brostar_api/settings.py @@ -1,6 +1,8 @@ import os from pathlib import Path +import sentry_sdk + # Environment variables can get a value from an .env file via docker-compose. # In development, you'll need to set the NENS_AUTH_* ones. FIELD_ENCRYPTION_KEY = os.getenv( @@ -17,6 +19,7 @@ DATABASE_HOST = os.getenv("DATABASE_HOST", "db") DATABASE_USER = os.getenv("DATABASE_USER", "brostar") DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD", "brostar") +SENTRY_DSN = os.getenv("SENTRY_DSN") # Not required, only used in staging/production. # Convert the environment variable (which is a string) to a boolean. DEBUG = DEBUG_ENV.lower() == "true" # True is the default @@ -206,6 +209,10 @@ # TODO: fix celery env settings CELERY_BROKER_URL = "redis://redis:6379/0" +if SENTRY_DSN: + # SENTRY_DSN will only be set on staging/production, btw. + sentry_sdk.init(dsn=SENTRY_DSN) + # BRO SETTINGS BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl" BRONHOUDERSPORTAAL_URL = "https://acc.bronhouderportaal-bro.nl" From dbb990aed28a8a094c69df2c6f056a41d6edf787 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Thu, 4 Apr 2024 11:09:55 +0200 Subject: [PATCH 3/3] More sorting :-) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f02074c..77e8010 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,5 +23,5 @@ whitenoise xmltodict # development tools -ruff coverage +ruff