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 csi_operations_seconds metrics on kubelet #98979
Conversation
@Jiawei0227: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/retest |
6948d83
to
cd0d2ee
Compare
/retest |
384c0fc
to
9c79848
Compare
pkg/volume/util/metrics.go
Outdated
@@ -80,6 +82,17 @@ var storageOperationEndToEndLatencyMetric = metrics.NewHistogramVec( | |||
[]string{"plugin_name", "operation_name"}, | |||
) | |||
|
|||
var csiOperationsLatencyMetric = metrics.NewHistogramVec( | |||
&metrics.HistogramOpts{ | |||
Subsystem: "csi_kubelet", |
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.
add this as a const instead so it's clear what to use if more csi metrics are added.
And it doesn't look like we have any subsystems defined. I think it might be simpler to just have a "csi" subsystem? eg, the existing storage_operation_duration_seconds metric doesn't have one version for the master and one for the kubelet, the same metric is used both places. I think it would be a good idea to be consistent with that for CSI metrics too.
Unless there's some other context here for a csi_kubelet subsystem?
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 am doing the sub_system thing here because the current sidecar CSI metric name is: csi_sidecar_operations_seconds
, I dont think the sidecar part fits in here. So I am coming up with this name. I am fine with csi_operations_seconds
here as well. But note that this metrics only exists for the kubelet part and kube-controller-manager is not exposing this metric at all.
I see. Let's do just csi then. It gives us flexibility in case we do add
metrics elsewhere
I think the sidecars having a different name is ok since they're external
and in a different code base.
…On Wed, Feb 17, 2021, 11:59 Jiawei Wang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/volume/util/metrics.go
<#98979 (comment)>
:
> @@ -80,6 +82,17 @@ var storageOperationEndToEndLatencyMetric = metrics.NewHistogramVec(
[]string{"plugin_name", "operation_name"},
)
+var csiOperationsLatencyMetric = metrics.NewHistogramVec(
+ &metrics.HistogramOpts{
+ Subsystem: "csi_kubelet",
I am doing the sub_system thing here because the current sidecar CSI
metric name is: csi_sidecar_operations_seconds, I dont think the sidecar
part fits in here. So I am coming up with this name. I am fine with
csi_operations_seconds here as well. But note that this metrics only
exists for the kubelet part and kube-controller-manager is not exposing
this metric at all.
https://github.com/kubernetes-csi/csi-lib-utils/blob/44b91e2a7b0af8199fc65c1142f664fd5f7abb96/metrics/metrics.go#L39
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#98979 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJCBABKEEF4LH264NMJG6TS7QNZNANCNFSM4XOAMPOA>
.
|
9c79848
to
43bc6fa
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jiawei0227, msau42 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds a new metrics called
csi_operations_seconds
for kubelet. It records the kubelet CSI operation to the driver.Example:
This is useful to get the operation metrics from Node side. Similarly, we have the
csi_sidecar_operations_seconds
which runs on the sidecar containers and that only records the controller side operation. With this new metric, we get a full picture of the metrics.Which issue(s) this PR fixes:
#98279 is related
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/sig storage
/assign @msau42
/cc @mattcary @saad-ali