Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add Sentry

Marcin Gębala76c6d943da12
diff --git a/requirements.in b/requirements.in
index 9d3fbe7190..bd0581a7a3 100644
--- a/requirements.in
+++ b/requirements.in
@@ -47,6 +47,7 @@ pytest-django
pytest-vcr
pytest-mock
vcrpy
+raven==6.9.0
requests>=1.2.0
social-auth-app-django>=2.0.0
text-unidecode
diff --git a/requirements.txt b/requirements.txt
index c694e10132..c5b323196e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -93,6 +93,7 @@ python-dateutil==2.6.1 # via botocore, elasticsearch-dsl, faker, freezegun
python3-openid==3.1.0 # via social-auth-core
pytz==2018.3 # via babel, celery, django
pyyaml==3.12 # via vcrpy
+raven==6.9.0
redis==2.10.6 # via celery, django-redis
requests-oauthlib==0.8.0 # via social-auth-core
requests==2.18.4
diff --git a/saleor/settings.py b/saleor/settings.py
index bf0cbfcdae..c529592799 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -8,6 +8,8 @@ from django.contrib.messages import constants as messages
from django.utils.translation import gettext_lazy as _
from django_prices.templatetags.prices_i18n import get_currency_fraction
+from . import __version__
+
def get_list(text):
return [item.strip() for item in text.split(',')]
@@ -227,7 +229,8 @@ INSTALLED_APPS = [
'django_celery_results',
'impersonate',
'phonenumber_field',
- 'captcha']
+ 'captcha',
+ 'raven.contrib.django.raven_compat']
if DEBUG:
MIDDLEWARE.append(
@@ -494,3 +497,11 @@ NOCAPTCHA = True
# Set Google's reCaptcha keys
RECAPTCHA_PUBLIC_KEY = os.environ.get('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = os.environ.get('RECAPTCHA_PRIVATE_KEY')
+
+
+# Sentry
+RAVEN_DSN = os.environ.get('RAVEN_DSN')
+if RAVEN_DSN:
+ RAVEN_CONFIG = {
+ 'dsn': RAVEN_DSN,
+ 'release': __version__}