-
Notifications
You must be signed in to change notification settings - Fork 369
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 group snapshot controller metrics #1107
Conversation
Hi @yati1998. Thanks for your PR. I'm waiting for a kubernetes-csi 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. |
|
@yati1998 please write something in the PR descriptions release-note field. /ok-to-test |
pkg/metrics/metrics_test.go
Outdated
expected := | ||
`# HELP snapshot_controller_operation_total_seconds [ALPHA] Total number of seconds spent by the controller on an operation from end to end | ||
# TYPE snapshot_controller_operation_total_seconds histogram | ||
snapshot_controller_operation_total_seconds_bucket{driver_name="driver1",operation_name="op1",operation_status="Success",snapshot_type="",le="0.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.
For group snapshot, can you change the type from "snapshot_type" to "group_snapshot_type"?
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.
to create a new label, we have to replication the whole of operation metrics, which will unnecessarily replicate a lot, anyways, the value has to be same for it, what do you think?
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 added a comment to change to dynamic_group and pre-provisioned_group instead.
The individual volume snapshots are statically provisioned in this case, so I want to make the difference clear.
Can you also add test for statically provisioned group snapshots? |
Can you also add test results for delete group snapshot? |
In the release note, please also add exactly what metric is added. |
unfortunately that's not working, cause deletion is getting suck as mentioned earlier. Will try to resolve that issue first. |
no new metric is added, we can use same metric to get the groupvolumesnapshot as well. |
this commit adds metrics for volumegroupsnapshot Signed-off-by: yati1998 <[email protected]>
Can you add the name of the metric in the release note? |
done |
Please update the testing results. |
Please update test results with pre-provisioned group snapshots and add a "TODO" in the PR description for delete group snapshot. |
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.71845164359e+09
# HELP snapshot_controller_operation_total_seconds [ALPHA] Total number of seconds spent by the controller on an operation
# TYPE snapshot_controller_operation_total_seconds histogram
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="0.1"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="0.25"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="0.5"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="1"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="2.5"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="5"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="10"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="15"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="30"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="60"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="120"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="300"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="600"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned",le="+Inf"} 2
snapshot_controller_operation_total_seconds_sum{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned"} 4.770233558
snapshot_controller_operation_total_seconds_count{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshot",operation_status="success",snapshot_type="pre-provisioned"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="0.1"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="0.25"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="0.5"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="1"} 0
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="2.5"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="5"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="10"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="15"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="30"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="60"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="120"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="300"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="600"} 2
snapshot_controller_operation_total_seconds_bucket{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned",le="+Inf"} 2
snapshot_controller_operation_total_seconds_sum{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned"} 4.780226055
snapshot_controller_operation_total_seconds_count{driver_name="hostpath.csi.k8s.io",operation_name="CreateGroupSnapshotAndReady",operation_status="success",snapshot_type="pre-provisioned"} 2
# HELP snapshot_controller_operations_in_flight [ALPHA] Total number of operations in flight
# TYPE snapshot_controller_operations_in_flight gauge
snapshot_controller_operations_in_flight 2 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xing-yang, yati1998 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?
What this PR does / why we need it:
This PR introduces new operation like CreateGroupsnapshot, DeleteGroupsnapshots, etc to the existing metrics
Testing
TODO
Add output for deleteGroupSnapshot operation
Which issue(s) this PR fixes:
Fixes # 1081
Special notes for your reviewer:
n/a
Does this PR introduce a user-facing change?: