mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Supply volume fs metrics to server/stats/handler.go
* Metrics will not be expose until they are hooked up to a handler * Metrics are not cached and expose a dos vector, this must be fixed before release or the stats should not be exposed through an api endpoint
This commit is contained in:
@@ -37,6 +37,7 @@ const (
|
||||
PodWorkerStartLatencyKey = "pod_worker_start_latency_microseconds"
|
||||
PLEGRelistLatencyKey = "pleg_relist_latency_microseconds"
|
||||
PLEGRelistIntervalKey = "pleg_relist_interval_microseconds"
|
||||
MetricsVolumeCalcLatencyKey = "metrics_volume_calc_microseconds"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -121,6 +122,13 @@ var (
|
||||
Help: "Interval in microseconds between relisting in PLEG.",
|
||||
},
|
||||
)
|
||||
MetricsVolumeCalcLatency = prometheus.NewSummary(
|
||||
prometheus.SummaryOpts{
|
||||
Subsystem: KubeletSubsystem,
|
||||
Name: MetricsVolumeCalcLatencyKey,
|
||||
Help: "Latency in microseconds for calculating volume metrics.",
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
var registerMetrics sync.Once
|
||||
@@ -141,6 +149,7 @@ func Register(containerCache kubecontainer.RuntimeCache) {
|
||||
prometheus.MustRegister(newPodAndContainerCollector(containerCache))
|
||||
prometheus.MustRegister(PLEGRelistLatency)
|
||||
prometheus.MustRegister(PLEGRelistInterval)
|
||||
prometheus.MustRegister(MetricsVolumeCalcLatency)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user