Skip to content

Commit 4218afe

Browse files
authored
migrate from raven to sentry sdk (#2789)
1 parent b9f398c commit 4218afe

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

prod-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
gunicorn==23.0.0
22

3-
raven==6.10.0
3+
sentry-sdk[django]==2.40.0
44

55
# Heroku
66
Whitenoise==6.11.0 # 6.4.0 is first version that supports Django 4.2

pydotorg/settings/cabotage.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
22

33
import dj_database_url
4-
import raven
4+
import sentry_sdk
5+
from sentry_sdk.integrations.django import DjangoIntegration
56
from decouple import Csv
67

78
from .base import *
@@ -71,14 +72,14 @@
7172
SESSION_COOKIE_SECURE = True
7273
CSRF_COOKIE_SECURE = True
7374

74-
INSTALLED_APPS += [
75-
"raven.contrib.django.raven_compat",
76-
]
77-
78-
RAVEN_CONFIG = {
79-
"dsn": config('SENTRY_DSN'),
80-
"release": config('SOURCE_COMMIT'),
81-
}
75+
sentry_sdk.init(
76+
dsn=config('SENTRY_DSN'),
77+
integrations=[DjangoIntegration()],
78+
release=config('SOURCE_COMMIT'),
79+
send_default_pii=True,
80+
traces_sample_rate=0.1,
81+
profiles_sample_rate=0.1,
82+
)
8283

8384
AWS_ACCESS_KEY_ID = config('AWS_ACCESS_KEY_ID')
8485
AWS_SECRET_ACCESS_KEY = config('AWS_SECRET_ACCESS_KEY')

pydotorg/settings/static.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import os
22

33
import dj_database_url
4-
import raven
54
from decouple import Csv
65

76
from .base import *

0 commit comments

Comments
 (0)