Last active
December 15, 2015 18:39
-
-
Save dctrwatson/5305289 to your computer and use it in GitHub Desktop.
Adding raven to graphite-web
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings' | |
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry | |
from django.core.handlers.wsgi import WSGIHandler | |
application = Sentry(WSGIHandler()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from graphite.app_settings import * | |
RAVEN_CONFIG = { | |
'dsn': 'http://my:[email protected]/24', | |
} | |
INSTALLED_APPS = INSTALLED_APPS + ( | |
'raven.contrib.django.raven_compat', | |
) | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'root': { | |
'level': 'WARNING', | |
'handlers': ['sentry'], | |
}, | |
'formatters': { | |
'verbose': { | |
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' | |
}, | |
}, | |
'handlers': { | |
'sentry': { | |
'level': 'ERROR', | |
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', | |
}, | |
'console': { | |
'level': 'DEBUG', | |
'class': 'logging.StreamHandler', | |
'formatter': 'verbose' | |
} | |
}, | |
'loggers': { | |
'django.db.backends': { | |
'level': 'ERROR', | |
'handlers': ['console'], | |
'propagate': False, | |
}, | |
'raven': { | |
'level': 'DEBUG', | |
'handlers': ['console'], | |
'propagate': False, | |
}, | |
'sentry.errors': { | |
'level': 'DEBUG', | |
'handlers': ['console'], | |
'propagate': False, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment