Skip to content

Commit c97a34e

Browse files
evanpurkhiserarmenzg
authored andcommitted
ref(uptime): Stop writing uptime_rule (#98489)
We don't need this anymore to link back to the uptime monitor, we'll be using the detector ID, which is part of the occurrence evidence data. Should not merge until after we've cut-over the UI to only using detector IDs.
1 parent 8cd4e96 commit c97a34e

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/sentry/uptime/grouptype.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from sentry.models.group import GroupStatus
1717
from sentry.ratelimits.sliding_windows import Quota
1818
from sentry.types.group import PriorityLevel
19-
from sentry.uptime.models import UptimeStatus, UptimeSubscription, get_project_subscription
19+
from sentry.uptime.models import UptimeStatus, UptimeSubscription
2020
from sentry.uptime.types import GROUP_TYPE_UPTIME_DOMAIN_CHECK_FAILURE, UptimeMonitorMode
2121
from sentry.utils import metrics
2222
from sentry.workflow_engine.handlers.detector.base import DetectorOccurrence, EventData
@@ -131,19 +131,12 @@ def build_event_data(result: CheckResult, detector: Detector) -> EventData:
131131
# Received time is the actual time the check was performed.
132132
received = datetime.fromtimestamp(result["actual_check_time_ms"] / 1000)
133133

134-
# XXX(epurkhiser): This can be changed over to using the detector ID in the
135-
# future once we're no longer using the ProjectUptimeSubscription.id as a tag.
136-
project_subscription = get_project_subscription(detector)
137-
138134
return {
139135
"project_id": detector.project_id,
140136
"environment": env,
141137
"received": received,
142138
"platform": "other",
143139
"sdk": None,
144-
"tags": {
145-
"uptime_rule": str(project_subscription.id),
146-
},
147140
"contexts": {
148141
"trace": {"trace_id": result["trace_id"], "span_id": result.get("span_id")},
149142
},

tests/sentry/uptime/test_grouptype.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ def test_build_event_data(self) -> None:
124124
"project_id": detector.project_id,
125125
"received": datetime.now().replace(microsecond=0),
126126
"sdk": None,
127-
"tags": {"uptime_rule": str(project_subscription.id)},
128127
"contexts": {
129128
"trace": {"trace_id": result["trace_id"], "span_id": result.get("span_id")}
130129
},

0 commit comments

Comments
 (0)