From e7f0930a65d94313f326ddfe913762038fa61836 Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Tue, 8 Oct 2024 16:22:09 -0400 Subject: [PATCH] Add ENVIRONMENT setting to staging/production configs This django setting will help us differentiate between production and development environments when initializing Sentry. --- CHANGES.txt | 5 +++++ ctlsettings/production.py | 1 + ctlsettings/staging.py | 1 + 3 files changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 5eb15fc..8c90111 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +0.3.6 +==================== +* Added ENVIRONMENT django setting, denoting either 'staging' or + 'production' + 0.3.5 (2024-10-08) ==================== * Updated sentry_init to include environment tag. diff --git a/ctlsettings/production.py b/ctlsettings/production.py index 4aaac95..7f9b4d4 100644 --- a/ctlsettings/production.py +++ b/ctlsettings/production.py @@ -16,6 +16,7 @@ def common(**kwargs): s3prefix = kwargs.get('s3prefix', 'ctl') DEBUG = False + ENVIRONMENT = 'production' DATABASES = { 'default': { diff --git a/ctlsettings/staging.py b/ctlsettings/staging.py index 35cb4d0..3485c8c 100644 --- a/ctlsettings/staging.py +++ b/ctlsettings/staging.py @@ -17,6 +17,7 @@ def common(**kwargs): DEBUG = False STAGING_ENV = True + ENVIRONMENT = 'staging' STATSD_PREFIX = project + "-staging"