Commit 225d50d1 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Adds Sentry

parent f0e3a902
......@@ -80,11 +80,17 @@ LOGGING = {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'sentry': {
'level': 'ERROR',
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
'tags': {'custom-tag': 'x'},
},
},
'loggers': {
'django': {
'handlers': ['console'],
'handlers': ['console', 'sentry'],
'level': 'INFO',
},
'django.request': {
......@@ -191,6 +197,8 @@ INSTALLED_APPS = (
# Visual enhancment
'grappelli.dashboard',
'grappelli',
'raven.contrib.django.raven_compat',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
......
......@@ -8,6 +8,9 @@
# Import Django related libraries
# Third party libraries
import raven
# Import project libraries
from .base import *
from ..secrets import get_secret
......@@ -59,3 +62,18 @@ DATABASES = {
TIME_ZONE = 'America/Montreal'
PERCOLATOR_BIN = r'/usr/bin/percolator'
if os.getenv('SENTRY', None):
RAVEN_CONFIG = {
'dsn': get_secret('SENTRY'),
# If you are using git, you can also automatically configure the
# release based on the git info.
'release': os.getenv('GIT_SHA'),
}
# 404 logging
MIDDLEWARE_CLASSES.insert(0, 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware')
MIDDLEWARE_CLASSES.insert(0, 'x_forwarded_for.middleware.XForwardedForMiddleware')
......@@ -7,4 +7,5 @@ biopython==1.64
numpy==1.9.1
scipy==0.16.0
pytz==2014.7
gunicorn==19.6.0
\ No newline at end of file
gunicorn==19.6.0
raven==6.3.0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment