mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
kubelet: add DRAGRPCOperationsDuration metric
This commit is contained in:
parent
a21f3f0a04
commit
2048b7b8fd
@ -135,6 +135,7 @@ const (
|
||||
|
||||
// Metric keys for DRA operations
|
||||
DRAOperationsDurationKey = "operations_duration_seconds"
|
||||
DRAGRPCOperationsDurationKey = "grpc_operations_duration_seconds"
|
||||
|
||||
// Values used in metric labels
|
||||
Container = "container"
|
||||
@ -954,6 +955,18 @@ var (
|
||||
},
|
||||
[]string{"operation_name", "is_error"},
|
||||
)
|
||||
|
||||
// DRAGRPCOperationsDuration tracks the duration of the DRA GRPC operations.
|
||||
DRAGRPCOperationsDuration = metrics.NewHistogramVec(
|
||||
&metrics.HistogramOpts{
|
||||
Subsystem: DRASubsystem,
|
||||
Name: DRAGRPCOperationsDurationKey,
|
||||
Help: "Duration in seconds of the DRA gRPC operations",
|
||||
Buckets: metrics.DefBuckets,
|
||||
StabilityLevel: metrics.ALPHA,
|
||||
},
|
||||
[]string{"driver_name", "method_name", "grpc_status_code"},
|
||||
)
|
||||
)
|
||||
|
||||
var registerMetrics sync.Once
|
||||
@ -1049,6 +1062,7 @@ func Register(collectors ...metrics.StableCollector) {
|
||||
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
||||
legacyregistry.MustRegister(DRAOperationsDuration)
|
||||
legacyregistry.MustRegister(DRAGRPCOperationsDuration)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user