Support sentry celery and redis integrations
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>spacecruft
parent
6d86d9fb23
commit
3f4e5fe03f
|
@ -10,7 +10,9 @@ from __future__ import absolute_import, division, print_function, \
|
||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
from decouple import Csv, config
|
from decouple import Csv, config
|
||||||
from dj_database_url import parse as db_url
|
from dj_database_url import parse as db_url
|
||||||
|
from sentry_sdk.integrations.celery import CeleryIntegration
|
||||||
from sentry_sdk.integrations.django import DjangoIntegration
|
from sentry_sdk.integrations.django import DjangoIntegration
|
||||||
|
from sentry_sdk.integrations.redis import RedisIntegration
|
||||||
from unipath import Path
|
from unipath import Path
|
||||||
|
|
||||||
ROOT = Path(__file__).parent
|
ROOT = Path(__file__).parent
|
||||||
|
@ -231,7 +233,12 @@ LOGGING = {
|
||||||
# Sentry
|
# Sentry
|
||||||
SENTRY_ENABLED = config('SENTRY_ENABLED', default=False, cast=bool)
|
SENTRY_ENABLED = config('SENTRY_ENABLED', default=False, cast=bool)
|
||||||
if SENTRY_ENABLED:
|
if SENTRY_ENABLED:
|
||||||
sentry_sdk.init(dsn=config('SENTRY_DSN', default=''), integrations=[DjangoIntegration()])
|
sentry_sdk.init(
|
||||||
|
dsn=config('SENTRY_DSN', default=''),
|
||||||
|
integrations=[CeleryIntegration(),
|
||||||
|
DjangoIntegration(),
|
||||||
|
RedisIntegration()]
|
||||||
|
)
|
||||||
|
|
||||||
# Celery
|
# Celery
|
||||||
CELERY_ENABLE_UTC = USE_TZ
|
CELERY_ENABLE_UTC = USE_TZ
|
||||||
|
|
Loading…
Reference in New Issue