chore: Add CSI-specific Prometheus metrics#2943
chore: Add CSI-specific Prometheus metrics#2943k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
Conversation
|
Hi @hccheng72. 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. DetailsInstructions 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. |
There was a problem hiding this comment.
Pull request overview
This PR introduces dedicated CSI-specific Prometheus metrics for the AzureFile CSI driver by creating a new metrics package (pkg/metrics), separate from the existing Azure cloud provider API metrics. The change enables better observability of CSI operations with operation-level tracking of duration and success rates.
Changes:
- Added new
pkg/metricspackage with CSI-specific Prometheus metrics (histogram and counter) - Integrated new CSI metrics into controller server operations (CreateVolume, DeleteVolume, CreateSnapshot, DeleteSnapshot, ControllerExpandVolume)
- Integrated new CSI metrics into node server operations (NodePublishVolume, NodeUnpublishVolume, NodeStageVolume, NodeUnstageVolume)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/metrics/metrics.go | Defines CSI-specific Prometheus metrics with histogram and counter collectors, plus CSIMetricContext helper for tracking operation duration and success |
| pkg/metrics/metrics_test.go | Comprehensive unit tests for the new metrics package including success/failure tracking, labeled metrics, and edge cases |
| pkg/azurefile/controllerserver.go | Replaces cloud-provider metrics with new CSI metrics in controller operations; removes unused error check code |
| pkg/azurefile/nodeserver.go | Adds CSI metrics tracking to node operations; maintains cloud-provider metrics for remaining operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e0427f2 to
78e134c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
78e134c to
8f57958
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, hccheng72 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
|
/cherrypick release-1.34 |
|
@andyzhangx: new pull request created: #2946 DetailsIn 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-sigs/prow repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR introduces dedicated CSI operation metrics for the AzureFile CSI driver, separate from the existing Azure cloud provider API metrics, enabling better observability of CSI operations.
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: