Skip to content
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

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

droot
Copy link
Contributor

@droot droot commented Dec 6, 2018

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.

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 6, 2018
@@ -47,6 +56,7 @@ var (
func init() {
metrics.Registry.MustRegister(
QueueLength,
ReconcileTotal,
ReconcileErrors,
Copy link
Member

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?

Copy link
Member

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?

Copy link
Contributor Author

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.

@droot droot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 7, 2018
@droot
Copy link
Contributor Author

droot commented Dec 7, 2018

putting this PR on hold because want to fix the tests.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 10, 2018
@droot droot force-pushed the metrics/reconciles_total branch 2 times, most recently from 30c315c to 19fcd38 Compare December 10, 2018 22:19
@droot droot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 10, 2018
@droot
Copy link
Contributor Author

droot commented Dec 10, 2018

Added separate tests for reconcile_total. So this is good to go from my end. @DirectXMan12 @mengqiy PTAL.

Copy link
Member

@mengqiy mengqiy left a 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",
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

@droot
Copy link
Contributor Author

droot commented Dec 14, 2018

@mengqiy updated the PR, pl. take a look.

@mengqiy
Copy link
Member

mengqiy commented Dec 14, 2018

/lgtm
Linter is complaining a misspelling. Please fix.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2018
@mengqiy
Copy link
Member

mengqiy commented Dec 14, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2018
@mengqiy
Copy link
Member

mengqiy commented Dec 14, 2018

@droot It seems goimports is not happy

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2018
@droot
Copy link
Contributor Author

droot commented Dec 19, 2018

@mengqiy updated the tests and took care of the metalinter warnings. PTAL

@mengqiy
Copy link
Member

mengqiy commented Dec 19, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 19, 2018
@k8s-ci-robot k8s-ci-robot merged commit 99de6ad into kubernetes-sigs:master Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants