mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
kubelet: add DRAGRPCOperationsDuration metric
This commit is contained in:
parent
a21f3f0a04
commit
2048b7b8fd
@ -134,7 +134,8 @@ const (
|
|||||||
ContainerAlignedComputeResourcesBoundaryLabelKey = "boundary"
|
ContainerAlignedComputeResourcesBoundaryLabelKey = "boundary"
|
||||||
|
|
||||||
// Metric keys for DRA operations
|
// Metric keys for DRA operations
|
||||||
DRAOperationsDurationKey = "operations_duration_seconds"
|
DRAOperationsDurationKey = "operations_duration_seconds"
|
||||||
|
DRAGRPCOperationsDurationKey = "grpc_operations_duration_seconds"
|
||||||
|
|
||||||
// Values used in metric labels
|
// Values used in metric labels
|
||||||
Container = "container"
|
Container = "container"
|
||||||
@ -954,6 +955,18 @@ var (
|
|||||||
},
|
},
|
||||||
[]string{"operation_name", "is_error"},
|
[]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
|
var registerMetrics sync.Once
|
||||||
@ -1049,6 +1062,7 @@ func Register(collectors ...metrics.StableCollector) {
|
|||||||
|
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
||||||
legacyregistry.MustRegister(DRAOperationsDuration)
|
legacyregistry.MustRegister(DRAOperationsDuration)
|
||||||
|
legacyregistry.MustRegister(DRAGRPCOperationsDuration)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user