diff --git a/requirements.txt b/requirements.txt index 712ae71..0cd61d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,3 +20,4 @@ lxml Pillow requests==2.* requests_mock==1.* +sentry-sdk==2.* diff --git a/webapp/webapp/settings/prod.py b/webapp/webapp/settings/prod.py index a0eecac..bee1d9f 100644 --- a/webapp/webapp/settings/prod.py +++ b/webapp/webapp/settings/prod.py @@ -1,6 +1,7 @@ """Settings for production.""" import os +import sentry_sdk from .base import * from . import validate @@ -60,4 +61,13 @@ LOGGING = config.configure_logging(LOG_ROOT) # Use manifest to manage static file versions for cache busting: -STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' +STATICFILES_STORAGE = ( + 'django.contrib.staticfiles.storage' + '.ManifestStaticFilesStorage') + +sentry_sdk.init( + dsn="https://426e64399bbafe4210c4fa647c7a2f5b@sentry.galaxyproject.org/20", + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for tracing. + traces_sample_rate=1.0, +) diff --git a/webapp/webapp/urls.py b/webapp/webapp/urls.py index 3407f3c..9a20660 100644 --- a/webapp/webapp/urls.py +++ b/webapp/webapp/urls.py @@ -29,6 +29,7 @@ path('news/', include('news.urls')), path('events/', include('events.urls')), path('people/', include('people.urls')), + path('test-error-handlers/', lambda x: 1 / 0), ] if settings.DEBUG: