Skip to content

Commit 6f31139

Browse files
committed
chore(ACI): Update metric issue dual processing metrics
1 parent 04ec428 commit 6f31139

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/sentry/incidents/subscription_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
498498
"organizations:workflow-engine-metric-alert-dual-processing-logs",
499499
self.subscription.project.organization,
500500
):
501-
metrics.incr("dual_processing.alert_rules.fire")
501+
metrics.incr("dual_processing.alert_rules.resolve")
502502
incident_trigger = self.trigger_resolve_threshold(
503503
trigger, aggregation_value
504504
)

src/sentry/workflow_engine/processors/workflow.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,10 @@ def process_workflows(event_data: WorkflowEventData) -> set[Workflow]:
313313
},
314314
)
315315
# in order to check if workflow engine is firing 1:1 with the old system, we must only count once rather than each action
316-
metrics.incr(
317-
"workflow_engine.process_workflows.fired_actions",
318-
tags={"detector_type": detector.type},
319-
)
316+
if len(actions) > 0:
317+
metrics.incr(
318+
"workflow_engine.process_workflows.fired_actions",
319+
tags={"detector_type": detector.type},
320+
)
320321

321322
return triggered_workflows

tests/sentry/incidents/test_subscription_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ def test_resolve_metrics(self, mock_metrics):
12851285
tags={"detection_type": "static"},
12861286
),
12871287
call(
1288-
"dual_processing.alert_rules.fire",
1288+
"dual_processing.alert_rules.resolve",
12891289
),
12901290
call("incidents.alert_rules.trigger", tags={"type": "resolve"}),
12911291
]

0 commit comments

Comments
 (0)