diff --git a/majak_uistyleguide/settings/base.py b/majak_uistyleguide/settings/base.py index 8c363fc5a838ac5437937328e7a9fc2973b777a8..b9b7cb9f044a676cfeb4b5a0bb5dcd67c997010e 100644 --- a/majak_uistyleguide/settings/base.py +++ b/majak_uistyleguide/settings/base.py @@ -1,5 +1,9 @@ from pathlib import Path + import environ +import sentry_sdk + +from sentry_sdk.integrations.django import DjangoIntegration ROOT_DIR = Path(__file__).parents[2] @@ -80,6 +84,20 @@ TEMPLATES = [ ] +# SENTRY +# ------------------------------------------------------------------------------ +SENTRY_DSN = env.str("SENTRY_DSN", default="") + +if SENTRY_DSN != "": + sentry_sdk.init( + dsn=SENTRY_DSN, + integrations=[ + DjangoIntegration(), + ], + send_default_pii=True, + ) + + # STATIC # ------------------------------------------------------------------------------ STATIC_URL = "/static/" diff --git a/requirements/prod.in b/requirements/prod.in index 8f22dccf99affb5ab9b1c65023ec083269269bca..95b6b01ee8885f9ab213465f84f1156159f9213e 100644 --- a/requirements/prod.in +++ b/requirements/prod.in @@ -1 +1,2 @@ gunicorn +sentry-sdk diff --git a/requirements/prod.txt b/requirements/prod.txt index f4a88f12b4c6224900fea3972bc4e461fa4b7a51..79fee394d0f5184f33fd0a43ac3e54fe3213726d 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -1,10 +1,16 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile prod.in # +certifi==2024.2.2 + # via sentry-sdk gunicorn==21.2.0 # via -r prod.in packaging==23.2 # via gunicorn +sentry-sdk==1.40.5 + # via -r prod.in +urllib3==2.2.1 + # via sentry-sdk