diff --git a/fragalysis/settings.py b/fragalysis/settings.py index 8f11d02c..089036af 100644 --- a/fragalysis/settings.py +++ b/fragalysis/settings.py @@ -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 @@ -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://27fa0675f555431aa02ca552e93d8cfb@o194333.ingest.sentry.io/1298290", + dsn=SENTRY_DNS, integrations=[DjangoIntegration(), CeleryIntegration(), RedisIntegration()], # If you wish to associate users to errors (assuming you are using