diff options
author | 2020-02-21 01:16:35 +0000 | |
---|---|---|
committer | 2020-02-21 01:16:35 +0000 | |
commit | a103f7c43081b39fe9a994d1c6ebcc5da2b12590 (patch) | |
tree | de3f12c397a74e178c69ba4215f004d54d6b8020 | |
parent | Add sentry_sdk dependency (diff) |
Add sentry SDK init to settings.py
-rw-r--r-- | pydis_site/settings.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 0a60559d..5f80a414 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -16,14 +16,24 @@ import sys import typing import environ +import sentry_sdk from django.contrib.messages import constants as messages +from sentry_sdk.integrations.django import DjangoIntegration + if typing.TYPE_CHECKING: from django.contrib.auth.models import User from wiki.models import Article env = environ.Env( - DEBUG=(bool, False) + DEBUG=(bool, False), + SITE_SENTRY_DSN=(str, "") +) + +sentry_sdk.init( + dsn=env('SITE_SENTRY_DSN'), + integrations=[DjangoIntegration()], + send_default_pii=True ) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |