diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-16 15:39:51 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-16 15:39:51 +0100 |
commit | b9690908690795c8252c0683a6fcee71317b9b78 (patch) | |
tree | c511a4d417acf076ccd4d7cc6f9ef18c85e06726 | |
parent | f7a873fe7fcdcfb4823f59596c00dea41d588514 (diff) | |
download | Ishtar-b9690908690795c8252c0683a6fcee71317b9b78.tar.bz2 Ishtar-b9690908690795c8252c0683a6fcee71317b9b78.zip |
Sentry: add celery integration
-rw-r--r-- | example_project/settings.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/example_project/settings.py b/example_project/settings.py index 11013daad..a5d1d3b3e 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -8,6 +8,7 @@ from importlib import import_module try: import sentry_sdk + from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk.integrations.django import DjangoIntegration except ImportError: sentry_sdk = None @@ -400,8 +401,11 @@ if not DEBUG: DATABASES['default']['CONN_MAX_AGE'] = 600 if SENTRY_ID and sentry_sdk: + sentry_integrations = [DjangoIntegration()] + if USE_BACKGROUND_TASK: + sentry_integrations.append(CeleryIntegration()) sentry_sdk.init( dsn=SENTRY_ID, - integrations=[DjangoIntegration()], + integrations=sentry_integrations, send_default_pii=True ) |