Conversation
Riscky
left a comment
There was a problem hiding this comment.
We never explicitly register failures, just (successful) attempts. Do we also want to register failures?
Also I'd recommend registering the priority as a label, so you'd get:
hoff_project_merge_attempted_pull_requests{priority="high"}
hoff_project_merge_attempted_pull_requests{priority="normal"}
instead of two separate metrics
I assumed that your failures can be derived from subtracting the successful attempts from your total attempts. If that's unwise we could look into tracking failures separately instead |
Not really, while the attempt it ongoing it will be added to one of the two metrics, but not the other (because we don't know if it will succeed yet) |
There was a problem hiding this comment.
I agree with Rick's suggestion for the metrics design: I think it's better to alter the existing hoff_project_merged_pull_requests to add a priority label, rather than introducing a new metric to track specifically the PRs merged with priority.
I also agree with Rick that only tracking attempted and completed merges can be used to detect failures: if we want to track failures we should probably add a new metric to track merge failures, grouped by repository, priority and failure reason (the options in
Lines 200 to 206 in adb1b34
We could also consider keeping a gauge with the number of PRs in the merge queue for every repository, but this is probably more cumbersome to implement.
Instead of a separate hoff_project_priority_merged_pull_requests counter, add a priority label to the existing hoff_project_merged_pull_requests counter. This lets us track merged PRs by priority (normal/high) in a single metric.
Add hoff_project_merge_failed_pull_requests counter that tracks integration failures grouped by project, priority (normal/high), and failure reason (merge_failed, rebase_failed, wrong_fixups, empty_rebase, failed_force_push). The metric is recorded in tryIntegratePullRequest when integration fails with a GitIntegrationFailure.
Used for finding change failure rates. Can also be used to find if merges failed.