Skip to content

Commit

Permalink
add sentry support
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Sep 16, 2024
1 parent 6f44ac3 commit e5dce79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ psycopg2-binary==2.9.6
pycryptodome==3.19.1
factory_boy
whitenoise==6.2.0
sentry-sdk==2.14.0
13 changes: 13 additions & 0 deletions tiaas/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,16 @@

GIT_COMMIT_ID = git.get_commit_id(BASE_DIR)
GIT_REMOTE_URL = git.get_remote_url(BASE_DIR)

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

if 'SENTRY_DSN' in os.environ:
sentry_sdk.init(
dsn=os.environ['SENTRY_DSN'],
integrations=[
DjangoIntegration(),
],
traces_sample_rate=0.1,
send_default_pii=False # requires use of django.contrib.auth which we do not use.
)

0 comments on commit e5dce79

Please sign in to comment.