-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
✨ added reconciles_total metric #239
✨ added reconciles_total metric #239
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: droot The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f4bd1ab
to
72306e8
Compare
@@ -47,6 +56,7 @@ var ( | |||
func init() { | |||
metrics.Registry.MustRegister( | |||
QueueLength, | |||
ReconcileTotal, | |||
ReconcileErrors, |
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.
Will ReconcileErrors
still be useful if we have ReconcileTotal
with label result=error
?
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.
Are these 2 identical actually?
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.
Yes, they will be identical. Will do a separate PR where we drop support for ReconcileErrors.
72306e8
to
30ba281
Compare
putting this PR on hold because want to fix the tests. |
30ba281
to
03178df
Compare
30c315c
to
19fcd38
Compare
Added separate tests for |
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.
LGTM with 1 nit
// success, error, requeue, requeue_after. | ||
ReconcileTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "controller_runtime_reconcile_total", | ||
Help: "Total number of reconciles per controller", |
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.
nit: reconcile is a verb, i.e. s/reconciles/reconciliations
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.
Addressed.
19fcd38
to
f497653
Compare
@mengqiy updated the PR, pl. take a look. |
/lgtm |
f497653
to
f88e297
Compare
/lgtm |
@droot It seems goimports is not happy |
f88e297
to
623b4a6
Compare
623b4a6
to
192a7d8
Compare
@mengqiy updated the tests and took care of the metalinter warnings. PTAL |
/lgtm |
This PR adds a new metric 'reconciles_total' to track total reconciles per controller.
Note: yet to add tests for it, sending in for early feedback.