1
0
Fork 0

Add sentry-sdk for logging

environments/stage/deployments/75
Pierros Papadeas 2018-12-09 11:29:11 +02:00
parent 923b6780bd
commit 2a90bad4b2
No known key found for this signature in database
GPG Key ID: 8DB97129D9982991
3 changed files with 14 additions and 0 deletions

View File

@ -1,6 +1,8 @@
from decouple import config, Csv
from dj_database_url import parse as db_url
from unipath import Path
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
ROOT = Path(__file__).parent
@ -203,6 +205,14 @@ LOGGING = {
}
}
# Sentry
SENTRY_ENABLED = config('SENTRY_ENABLED', default=False)
if SENTRY_ENABLED:
sentry_sdk.init(
dsn=config('SENTRY_DSN', default=''),
integrations=[DjangoIntegration()]
)
# Celery
CELERY_ENABLE_UTC = USE_TZ
CELERY_TIMEZONE = TIME_ZONE

View File

@ -10,3 +10,6 @@
# Mapbox
# MAPBOX_TOKEN=enter_mapbox_token_here
# Sentry
# SENTRY_DSN='sentry_dsn'

View File

@ -46,6 +46,7 @@ requests-cache==0.4.13
requests-oauthlib==0.8.0
rjsmin==1.0.12
satnogsdecoders==0.1
sentry-sdk==0.6.2
sgp4==1.4
shortuuid==0.5.0
simplejson==3.16.0