Skip to content

Commit da4afe4

Browse files
committed
put this back
1 parent a69bf80 commit da4afe4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sentry/incidents/subscription_processor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,6 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
376376

377377
aggregation_value = self.get_aggregation_value(subscription_update, comparison_delta)
378378

379-
if aggregation_value is None:
380-
metrics.incr("incidents.alert_rules.skipping_update_invalid_aggregation_value")
381-
return
382-
383379
if aggregation_value is not None:
384380
if has_metric_alert_processing:
385381
if self.alert_rule.detection_type == AlertRuleDetectionType.DYNAMIC:
@@ -450,6 +446,10 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
450446
if potential_anomalies is None:
451447
return
452448

449+
if aggregation_value is None:
450+
metrics.incr("incidents.alert_rules.skipping_update_invalid_aggregation_value")
451+
return
452+
453453
fired_incident_triggers: list[IncidentTrigger] = []
454454
with transaction.atomic(router.db_for_write(AlertRule)):
455455
# Triggers is the threshold - NOT an instance of a trigger

0 commit comments

Comments
 (0)