From a5006a0c853e08d12d491cb0a975b258f428c641 Mon Sep 17 00:00:00 2001 From: Richard Ortenberg Date: Mon, 10 Apr 2023 14:59:23 -0700 Subject: [PATCH 1/2] adds slug to tags --- src/sentry/monitors/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sentry/monitors/models.py b/src/sentry/monitors/models.py index 99687abdb661ad..cc5d05d8f52ae2 100644 --- a/src/sentry/monitors/models.py +++ b/src/sentry/monitors/models.py @@ -397,9 +397,7 @@ def mark_failed(self, last_checkin=None, reason=MonitorFailure.UNKNOWN): "contexts": {"monitor": get_monitor_environment_context(self)}, "fingerprint": ["monitor", str(self.monitor.guid), reason], "environment": self.environment.name, - "tags": { - "monitor.id": str(self.monitor.guid), - }, + "tags": {"monitor.id": str(self.monitor.guid), "monitor.slug": self.monitor.slug}, }, project=Project(id=self.monitor.project_id), ) From 8210f5c9096fcd2c3958590d24a68a4328ffa51c Mon Sep 17 00:00:00 2001 From: Richard Ortenberg Date: Mon, 10 Apr 2023 15:01:40 -0700 Subject: [PATCH 2/2] Update src/sentry/monitors/models.py Co-authored-by: Evan Purkhiser --- src/sentry/monitors/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sentry/monitors/models.py b/src/sentry/monitors/models.py index cc5d05d8f52ae2..59072c413c21b5 100644 --- a/src/sentry/monitors/models.py +++ b/src/sentry/monitors/models.py @@ -397,6 +397,8 @@ def mark_failed(self, last_checkin=None, reason=MonitorFailure.UNKNOWN): "contexts": {"monitor": get_monitor_environment_context(self)}, "fingerprint": ["monitor", str(self.monitor.guid), reason], "environment": self.environment.name, + # TODO: Both of these values should be get transformed from context to tags + # We should understand why that is not happening and remove these when it correctly is "tags": {"monitor.id": str(self.monitor.guid), "monitor.slug": self.monitor.slug}, }, project=Project(id=self.monitor.project_id),