-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
chore(ACI): Add 1:1 metrics for dual processing #91840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -312,5 +312,14 @@ def process_workflows(event_data: WorkflowEventData) -> set[Workflow]: | |
"detector_type": detector.type, | ||
}, | ||
) | ||
if features.has("organizations:workflow-engine-metric-alert-dual-processing-logs"): | ||
# in order to check if workflow engine is firing 1:1 with the old system, we must only count once rather than each action | ||
metrics.incr( | ||
"workflow_engine.process_workflows.fired_actions", | ||
tags={ | ||
"detector_type": detector.type, | ||
"organization_id": detector.project.organization_id, | ||
}, | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thoughts on pulling out the organization_id = None
if features.has("organizations:workflow-engine-metric-alert-dual-processing-logs"):
organization_id = detector.project.organization_id
metrics.incr(
"workflow_engine.process_workflows.triggered_actions",
amount=len(actions),
tags={"detector_type": detector.type, "organization_id": organization_id},
) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am making this a separate metric because I don't want to have the amount being set to the number of actions as that's not how we track it in the existing system. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry for the confusion, the action one is just meant to illustrate an existing metric decorated with the organization id. mostly just thinking that we could just add the organization id to all the existing metrics if we pull out the check for the feature and assign the org id to a separate variable. (very similar to the comment that dan had left) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 all the other metrics in this function pass an |
||
|
||
return triggered_workflows |
Uh oh!
There was an error while loading. Please reload this page.