@@ -134,7 +134,8 @@ const (
134
134
ContainerAlignedComputeResourcesBoundaryLabelKey = "boundary"
135
135
136
136
// Metric keys for DRA operations
137
- DRAOperationsDurationKey = "operations_duration_seconds"
137
+ DRAOperationsDurationKey = "operations_duration_seconds"
138
+ DRAGRPCOperationsDurationKey = "grpc_operations_duration_seconds"
138
139
139
140
// Values used in metric labels
140
141
Container = "container"
@@ -954,6 +955,18 @@ var (
954
955
},
955
956
[]string {"operation_name" , "is_error" },
956
957
)
958
+
959
+ // DRAGRPCOperationsDuration tracks the duration of the DRA GRPC operations.
960
+ DRAGRPCOperationsDuration = metrics .NewHistogramVec (
961
+ & metrics.HistogramOpts {
962
+ Subsystem : DRASubsystem ,
963
+ Name : DRAGRPCOperationsDurationKey ,
964
+ Help : "Duration in seconds of the DRA gRPC operations" ,
965
+ Buckets : metrics .DefBuckets ,
966
+ StabilityLevel : metrics .ALPHA ,
967
+ },
968
+ []string {"driver_name" , "method_name" , "grpc_status_code" },
969
+ )
957
970
)
958
971
959
972
var registerMetrics sync.Once
@@ -1049,6 +1062,7 @@ func Register(collectors ...metrics.StableCollector) {
1049
1062
1050
1063
if utilfeature .DefaultFeatureGate .Enabled (features .DynamicResourceAllocation ) {
1051
1064
legacyregistry .MustRegister (DRAOperationsDuration )
1065
+ legacyregistry .MustRegister (DRAGRPCOperationsDuration )
1052
1066
}
1053
1067
})
1054
1068
}
0 commit comments