Skip to content

Commit

Permalink
chore(Sentry): Get trace sample rate from env
Browse files Browse the repository at this point in the history
  • Loading branch information
qgerome committed Nov 4, 2021
1 parent 5c73655 commit c5a190c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openIMIS/openIMIS/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
}

SENTRY_DSN = os.environ.get("SENTRY_DSN", None)
SENTRY_SAMPLE_RATE = os.environ.get("SENTRY_SAMPLE_RATE", 0.2)
IS_SENTRY_ENABLED = False

if SENTRY_DSN is not None:
Expand All @@ -84,7 +85,7 @@
# 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,
traces_sample_rate=SENTRY_SAMPLE_RATE,
# 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,
Expand Down

0 comments on commit c5a190c

Please sign in to comment.