Skip to content

Commit

Permalink
More Sentry SDK tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmwatson committed Nov 8, 2023
1 parent b9a9b92 commit 4c664c7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pombola/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import socket

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

IN_TEST_MODE = False

# Work out where we are to set up the paths correctly and load config
Expand Down Expand Up @@ -715,15 +718,10 @@ def show_toolbar(request):

# Sentry
if os.environ.get("SENTRY_DSN"):
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

sentry_sdk.init(
dsn=os.environ.get("SENTRY_DSN"),
environment=os.environ.get("ENVIRONMENT"),
traces_sample_rate=os.environ.get("SENTRY_TRACES_SAMPLE_RATE", 1.0),
profiles_sample_rate=os.environ.get(
"SENTRY_PROFILES_SAMPLE_RATE", 1.0),
# Associate users to errors
send_default_pii=True
)

0 comments on commit 4c664c7

Please sign in to comment.