diff options
author | 2020-02-21 02:05:04 +0000 | |
---|---|---|
committer | 2020-02-21 02:05:04 +0000 | |
commit | 0cdb0b69d182eafaae42cd300cddc6aff16a9f5a (patch) | |
tree | ac6c06005923abfb63d97f729ad15b4d92b60a41 /pydis_site/settings.py | |
parent | Merge pull request #332 from python-discord/add-sentry (diff) | |
parent | Merge branch 'master' into add-sentry-sdk (diff) |
Merge pull request #333 from python-discord/add-sentry-sdk
Implement Sentry SDK
Diffstat (limited to 'pydis_site/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, ...) |