Skip to content

Commit

Permalink
Merge pull request #229 from duncanpeacock/issue-216-sentry-dns
Browse files Browse the repository at this point in the history
Issue 216 sentry dns
  • Loading branch information
reskyner authored Dec 16, 2020
2 parents 482690f + 3aa4adb commit c6c292b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fragalysis/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from sentry_sdk.integrations.redis import RedisIntegration

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

# These flags are used in the upload_tset form as follows.
# Proposal Supported | Proposal Required | Proposal / View fields
Expand All @@ -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 c6c292b

Please sign in to comment.