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

feat: add etcd_debugging_lease_total gauge metric #18067

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jimmy-bro
Copy link
Contributor

The feature was discussed in #17874 .

@k8s-ci-robot
Copy link

Hi @jimmy-bro. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot
Copy link

@jimmy-bro: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

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.

@henrybear327
Copy link
Contributor

/ok-to-test

leaseTotal = prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: "etcd_debugging",
Subsystem: "lease",
Name: "total",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Name: "total",
Name: "active",

Looking at the naming scheme above we have "granted_total", "revoked_total", "renewed_total", so if in the Help you called them "active leases" then let's put it in the name of the metric.

In prometheus conventions https://prometheus.io/docs/practices/naming/, suffix total is reserved for accumulating metrics like counters, for gauges we should skip it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the reminder. I never knew about this before, now I've learned something new。

@jimmy-bro jimmy-bro force-pushed the metrics branch 4 times, most recently from 81ae9e4 to 10174f3 Compare May 29, 2024 01:29
@chaochn47
Copy link
Member

@jimmy-bro could you please rebase and trigger the test again?

@jimmy-bro
Copy link
Contributor Author

Thanks for your mentiong @chaochn47 , I've already rebased the PR on git

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

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

Thanks for raising this @jimmy-bro - Overall it's looking good but can you please add some tests so we would be able to merge it?

Refer to #17983 for examples of unit and integration metrics tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

6 participants