Skip to content

Commit

Permalink
Move sentry dns to environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanpeacock committed Dec 15, 2020
1 parent e3b69af commit 4c05f11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fragalysis/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
# Should always be True on production.
AUTHENTICATE_UPLOAD = True

if DEBUG == False:
# This is set on AWX when the fragalysis-stack is rebuilt.
SENTRY_DNS = os.environ.get("FRAGALYSIS_BACKEND_SENTRY_DNS")
if DEBUG is False and SENTRY_DNS:
# By default only call sentry in staging/production
sentry_sdk.init(
dsn="https://[email protected]/1298290",
dsn=SENTRY_DNS,
integrations=[DjangoIntegration(), CeleryIntegration(), RedisIntegration()],

# If you wish to associate users to errors (assuming you are using
Expand Down

0 comments on commit 4c05f11

Please sign in to comment.