Skip to content

Commit

Permalink
Merge pull request #20 from nens/reinout-sentry
Browse files Browse the repository at this point in the history
Added sentry
  • Loading branch information
reinout authored Apr 4, 2024
2 parents 3bd1f89 + 573b9df commit db7f0e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions brostar_api/settings.py
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down
21 changes: 11 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@
--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
coverage
ruff

0 comments on commit db7f0e1

Please sign in to comment.