mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Upgrading Sentry API
This commit is contained in:
parent
1c62266127
commit
8427be6862
4 changed files with 21 additions and 5 deletions
|
@ -31,4 +31,5 @@ urlpatterns = [
|
|||
url(r'^delete_all_sites/?', views.delete_all_sites, name='profile-delete-all-sites'),
|
||||
url(r'^email_optout/?', views.email_optout, name='profile-email-optout'),
|
||||
url(r'^ios_subscription_status/?', views.ios_subscription_status, name='profile-ios-subscription-status'),
|
||||
url(r'debug/?', views.trigger_error, name='trigger-error'),
|
||||
]
|
||||
|
|
|
@ -714,3 +714,7 @@ def ios_subscription_status(request):
|
|||
return {
|
||||
"code": 1
|
||||
}
|
||||
|
||||
def trigger_error(request):
|
||||
division_by_zero = 1 / 0
|
||||
return HttpResponseRedirect(reverse('index'))
|
||||
|
|
|
@ -46,11 +46,11 @@ python-dateutil==2.6.0
|
|||
python-digitalocean==1.13.2
|
||||
python-gflags==3.1.0
|
||||
pytz==2018.3
|
||||
raven==6.5.0
|
||||
redis==3.5.3
|
||||
requests==2.20.0
|
||||
scipy==0.18.1
|
||||
seacucumber==1.5.2
|
||||
sentry-sdk==0.19.3
|
||||
simplejson==3.10.0
|
||||
six==1.10.0
|
||||
stripe==1.43.0
|
||||
|
|
|
@ -27,7 +27,8 @@ if '/vendor' not in ' '.join(sys.path):
|
|||
import logging
|
||||
import datetime
|
||||
import redis
|
||||
import raven
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
import django.http
|
||||
import re
|
||||
from mongoengine import connect
|
||||
|
@ -598,12 +599,22 @@ from local_settings import *
|
|||
|
||||
if not DEBUG:
|
||||
INSTALLED_APPS += (
|
||||
'raven.contrib.django',
|
||||
'django_ses',
|
||||
|
||||
)
|
||||
# RAVEN_CLIENT = raven.Client(dsn=SENTRY_DSN, release=raven.fetch_git_sha(os.path.dirname(__file__)))
|
||||
RAVEN_CLIENT = raven.Client(SENTRY_DSN)
|
||||
sentry_sdk.init(
|
||||
dsn=SENTRY_DSN,
|
||||
integrations=[DjangoIntegration()],
|
||||
|
||||
# Set traces_sample_rate to 1.0 to capture 100%
|
||||
# of transactions for performance monitoring.
|
||||
# We recommend adjusting this value in production,
|
||||
traces_sample_rate=1.0,
|
||||
|
||||
# If you wish to associate users to errors (assuming you are using
|
||||
# django.contrib.auth) you may enable sending PII data.
|
||||
send_default_pii=True
|
||||
)
|
||||
|
||||
COMPRESS = not DEBUG
|
||||
ACCOUNT_ACTIVATION_DAYS = 30
|
||||
|
|
Loading…
Add table
Reference in a new issue