diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-14 16:15:04 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-14 16:15:04 +0100 |
commit | 5cc723b8643a114a81d16006ead7e76b2af10137 (patch) | |
tree | d11cd29eb72c31e30cd4f1b7538c39f9134bf8da /example_project | |
parent | ac0b1d3178b5c7cbc4cc3baf225c093f63d7f72c (diff) | |
download | Ishtar-5cc723b8643a114a81d16006ead7e76b2af10137.tar.bz2 Ishtar-5cc723b8643a114a81d16006ead7e76b2af10137.zip |
Add Sentry integration
Diffstat (limited to 'example_project')
-rw-r--r-- | example_project/settings.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/example_project/settings.py b/example_project/settings.py index b858c5907..11013daad 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -6,6 +6,12 @@ import os import sys from importlib import import_module +try: + import sentry_sdk + from sentry_sdk.integrations.django import DjangoIntegration +except ImportError: + sentry_sdk = None + DEBUG = False DEBUG_TOOLBAR = False DEBUG_TO_CONSOLE = False @@ -286,8 +292,8 @@ MAX_UPLOAD_SIZE = 100 # in Mo DOT_BINARY = "/usr/bin/dot" TEST_RUNNER = 'ishtar_common.tests.ManagedModelTestRunner' - CELERY_BROKER_URL = '' +SENTRY_ID = None try: from local_settings import * @@ -392,3 +398,10 @@ if 'test' in sys.argv: if not DEBUG: # persistent connection DATABASES['default']['CONN_MAX_AGE'] = 600 + +if SENTRY_ID and sentry_sdk: + sentry_sdk.init( + dsn=SENTRY_ID, + integrations=[DjangoIntegration()], + send_default_pii=True + ) |