Skip to content

🌱metrics: Expose client-go metrics in the metrics server #3205

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

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

Conversation

ahmetb
Copy link
Member

@ahmetb ahmetb commented May 1, 2025

Problem: (Described in detail at #3202.) Currently the only client-side metric enabled in the controller processes is rest_client_requests_total, which is pretty limited.

This patch starts exporting more client-side metrics offered by client-go in the controller process by default by copying what component-base does for core Kubernetes components.

Closes #3202.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 1, 2025
@k8s-ci-robot k8s-ci-robot requested a review from joelanford May 1, 2025 22:15
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ahmetb
Once this PR has been reviewed and has the lgtm label, please assign alvaroaleman for approval. For more information see the Code Review Process.

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

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 1, 2025
@ahmetb ahmetb force-pushed the ahmet/client-go-metrics branch from 173c1ea to b53f68d Compare May 1, 2025 23:17
Problem: Currently the only client-side metric enabled in the controller
processes is `rest_client_requests_total`, which is pretty limited.

This patch starts exporting more client-side metrics offered by client-go in
the controller process by default by copying what `component-base` does for
core Kubernetes components.
@ahmetb ahmetb force-pushed the ahmet/client-go-metrics branch from b53f68d to 1b71fce Compare May 2, 2025 00:33
@troy0820
Copy link
Member

troy0820 commented May 2, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 2, 2025
Copy link
Contributor

@krisztianfekete krisztianfekete left a comment

Choose a reason for hiding this comment

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

Can you please adopt native histograms like I did here #3165?

@k8s-ci-robot
Copy link
Contributor

@krisztianfekete: changing LGTM is restricted to collaborators

In response to this:

Can you please adopt native histograms like I did here #3165?

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.

@@ -1,5 +1,5 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

NIT: The emoji should be ✨
(🌱 means that those changes would result in 0 impact on the end users - i.e. CI changes)

@sbueringer
Copy link
Member

Thx for opening the PR to provide more context to the proposal issue.

/hold
for now for discussion on the issue

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Proposal: Expose all client-go metrics by default
6 participants