only enable sentry when not DEBUG

This commit is contained in:
Jens Langhammer 2019-04-11 15:30:42 +02:00
parent 755045b226
commit 16eb629b71
1 changed files with 16 additions and 14 deletions

View File

@ -217,19 +217,21 @@ CELERY_BEAT_SCHEDULE = {
} }
} }
sentry_init(
dsn=("https://55b5dd780bc14f4c96bba69b7a9abbcc:449af483bd0745" if not DEBUG:
"0d83be640d834e5458@sentry.services.beryju.org/8"), sentry_init(
integrations=[ dsn=("https://55b5dd780bc14f4c96bba69b7a9abbcc:449af483bd0745"
DjangoIntegration(), "0d83be640d834e5458@sentry.services.beryju.org/8"),
CeleryIntegration(), integrations=[
LoggingIntegration( DjangoIntegration(),
level=logging.INFO, CeleryIntegration(),
event_level=logging.ERROR LoggingIntegration(
) level=logging.INFO,
], event_level=logging.ERROR
send_default_pii=True )
) ],
send_default_pii=True,
)
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/ # https://docs.djangoproject.com/en/2.1/howto/static-files/
@ -315,7 +317,7 @@ with CONFIG.cd('log'):
}, },
'daphne': { 'daphne': {
'handlers': LOG_HANDLERS, 'handlers': LOG_HANDLERS,
'level': 'DEBUG', 'level': 'INFO',
'propagate': True, 'propagate': True,
} }
} }