Built-in support for sentry

This commit is contained in:
Raphael Michel
2017-01-04 21:04:47 +01:00
parent b6e42d64da
commit 67de7150e5
7 changed files with 44 additions and 7 deletions
+14
View File
@@ -7,6 +7,7 @@ from django.contrib.messages import constants as messages # NOQA
from django.utils.crypto import get_random_string
from django.utils.translation import ugettext_lazy as _ # NOQA
from pkg_resources import iter_entry_points
from . import __version__
config = configparser.RawConfigParser()
config.read(['/etc/pretix/pretix.cfg', os.path.expanduser('~/.pretix.cfg'), 'pretix.cfg'],
@@ -205,6 +206,19 @@ for entry_point in iter_entry_points(group='pretix.plugin', name=None):
PLUGINS.append(entry_point.module_name)
INSTALLED_APPS.append(entry_point.module_name)
if config.has_option('sentry', 'dsn'):
INSTALLED_APPS += [
'raven.contrib.django.raven_compat',
]
DISABLE_SENTRY_INSTRUMENTATION = True # see celery.py for more, we use this differently
RAVEN_CONFIG = {
'dsn': config.get('sentry', 'dsn'),
'transport': 'raven.transport.threaded_requests.ThreadedRequestsHTTPTransport',
'release': __version__,
'environment': SITE_URL,
}
CORE_MODULES = {
("pretix", "base"),
("pretix", "presale"),