Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sentry #20

Merged
merged 4 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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