-
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
✨ Add rest client request duration and size metrics #2217
Conversation
|
||
requestResult = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Name: "rest_client_requests_total", |
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.
Just aligned this to the way the metrics are defined just with name instead of subsystem + name here: https://github.com/kubernetes/component-base/blob/master/metrics/prometheus/restclient/metrics.go#L78
@@ -62,11 +61,44 @@ var ( | |||
Buckets: prometheus.ExponentialBuckets(0.001, 2, 10), | |||
}, []string{"verb", "url"}) |
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.
I wonder if we should drop RequestLatency in l.41-62 (in a separate PR) given:
// Deprecated: This metric is deprecated for removal in a future release: using the URL as a
// dimension results in cardinality explosion for some consumers. It was deprecated upstream
// in k8s v1.14 and hidden in v1.17 via https://github.com/kubernetes/kubernetes/pull/83836.
Signed-off-by: Stefan Büringer buringerst@vmware.com
c7a8fb2
to
139e0d7
Compare
/assign @vincepri @alvaroaleman |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer, vincepri 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 |
@vincepri Would it be possible to cherry-pick this PR into release-0.14? No problem if we don't want to do it, would be just nice to be able to pick it up earlier |
/cherry-pick release-0.14 |
@vincepri: new pull request created: #2218 In response to this:
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/test-infra repository. |
Signed-off-by: Stefan Büringer buringerst@vmware.com
This PR adds the following metrics:
As they are defined in component-base upstream: https://github.com/kubernetes/component-base/blob/master/metrics/prometheus/restclient/metrics.go
I think the cardinality should be fine as the
host
label intentionally only contains the "template url".Example:
More examples can be found under: https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api/8207/pull-cluster-api-e2e-main/1630798093588893696/artifacts/clusters/bootstrap/metrics/capi-system/capi-controller-manager/capi-controller-manager-9db79449b-vnfh8/metrics.txt
(please note that this file contains more rest_client metrics than I added in this PR)