From 8de07be4e480230d91f585ffa2095b6e4999c857 Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Tue, 8 Oct 2024 11:24:35 -0400 Subject: [PATCH] Update sentry init to include environment This will help us filter issues in sentry. https://docs.sentry.io/platforms/python/configuration/environments/ --- CHANGES.txt | 4 ++++ ctlsettings/production.py | 1 + ctlsettings/staging.py | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2a520e2..810f1d1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +0.3.5 +==================== +* Updated sentry init to include environment tag. + 0.3.4 (2024-08-23) ==================== * Introduced init_sentry function for staging and production. diff --git a/ctlsettings/production.py b/ctlsettings/production.py index ee1d93f..4aaac95 100644 --- a/ctlsettings/production.py +++ b/ctlsettings/production.py @@ -98,4 +98,5 @@ def init_sentry(sentry_dsn: str) -> None: sentry_sdk.init( dsn=sentry_dsn, integrations=[DjangoIntegration()], + environment='production', ) diff --git a/ctlsettings/staging.py b/ctlsettings/staging.py index 3ada14f..46af6c3 100644 --- a/ctlsettings/staging.py +++ b/ctlsettings/staging.py @@ -91,4 +91,5 @@ def init_sentry(sentry_dsn: str) -> None: dsn=sentry_dsn, integrations=[DjangoIntegration()], debug=True, + environment='staging', )