-
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
✨ Support RateLimiterLatency & RequestLatency for client-go metrics (client, workqueue, reflector). #2986
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fengruotj 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 |
Welcome @fengruotj! |
Hi @fengruotj. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
ecaffdc
to
c0a7e6d
Compare
5001dca
to
73ce1ee
Compare
…ient, workqueue, reflector) Signed-off-by: tanjie.master <[email protected]>
73ce1ee
to
0d89471
Compare
Hi @varshaprasad96 @vincepri this is the pr feature: Support RateLimiterLatency & RequestLatency for client-go metrics. |
prometheus.HistogramOpts{ | ||
Name: "rest_client_rate_limiter_duration_seconds", | ||
Help: "Client side rate limiter latency in seconds. Broken down by verb and URL.", | ||
Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, |
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.
These have a ton of buckets and dimensions that include the path which means things like object names will be in there, this will result in a huge cardinality, we can not include something like this by default
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.
My primary requirement is to register some custom metrics for client-go/tools/metrics. However, when using controller-runtime, I am unable to customize the registration of client-go metrics because registerClientMetrics() has a higher precedence. Therefore, I need to add some additional metrics. Perhaps we could reduce the number of buckets and some tags metrics in this case, or using prometheus Summary metrics instead?
Currently the controller-runtime only expose client-go metrics with requestLatency. In a production environment, we need to expose more client-go Metrics, such as requestLatency and rateLimiterLatency.
This PR adds more client-go metrics with rest_client_request_duration_seconds & rest_client_rate_limiter_duration_seconds.