-
Notifications
You must be signed in to change notification settings - Fork 1.2k
✨ Add controller_runtime_reconcile_timeouts_total metric to track ReconciliationTimeout timeouts #3382
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
base: main
Are you sure you want to change the base?
✨ Add controller_runtime_reconcile_timeouts_total metric to track ReconciliationTimeout timeouts #3382
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: godwinpang The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @godwinpang. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
049f3d1 to
0a03d36
Compare
This PR adds a new metric controller_runtime_reconcile_timeouts_total to track when a controller's reconciliation has reached a ReconciliationTimeout. This provides visibility into when reconcile operations time out due to the controller-runtime wrapper timeout, allowing users to alert / monitor unexpectedly long running controller reconiliations.
0a03d36 to
39c3abd
Compare
|
sorry this ended up requesting a lot of reviewers - It's been a while since I've worked on c-r and I forgot bout the commit conventions hence the force pushes |
|
/ok-to-test |
| Expect(func() error { | ||
| Expect(ctrlmetrics.ReconcileTimeouts.WithLabelValues(ctrl.Name).Write(&reconcileTimeouts)).To(Succeed()) | ||
| if reconcileTimeouts.GetCounter().GetValue() != 0.0 { | ||
| return fmt.Errorf("metric reconcile timeouts not reset") | ||
| } | ||
| return nil | ||
| }()).Should(Succeed()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be part of the before each?
Add controller_runtime_reconcile_timeouts_total metric
Summary
This PR adds a new metric
controller_runtime_reconcile_timeouts_totalto track when a controller's reconciliation has reached aReconciliationTimeout. This provides visibility into when reconcile operations time out due to the controller-runtime wrapper timeout, allowing users to alert / monitor unexpectedly long running controller reconiliations.Problem
The
ReconciliationTimeoutfeature was added to prevent head-of-line (HOL) blocking by ensuring that a single reconcile cannot block a worker indefinitely. However, when a reconcile exits becauseReconciliationTimeoutfired, the existing metrics treat it like a normal return. There was no way to distinguish between:ReconciliationTimeoutcontext timeoutMetric
controller(controller name)