Move docker metrics to histogram metrics

This commit is contained in:
danielqsj 2018-12-26 16:00:38 +08:00
parent 94d1050303
commit 65aec219c8
2 changed files with 6 additions and 4 deletions

View File

@ -49,11 +49,12 @@ const (
var ( var (
// DockerOperationsLatency collects operation latency numbers by operation // DockerOperationsLatency collects operation latency numbers by operation
// type. // type.
DockerOperationsLatency = prometheus.NewSummaryVec( DockerOperationsLatency = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: kubeletSubsystem, Subsystem: kubeletSubsystem,
Name: DockerOperationsLatencyKey, Name: DockerOperationsLatencyKey,
Help: "Latency in seconds of Docker operations. Broken down by operation type.", Help: "Latency in seconds of Docker operations. Broken down by operation type.",
Buckets: prometheus.DefBuckets,
}, },
[]string{"operation_type"}, []string{"operation_type"},
) )

View File

@ -38,11 +38,12 @@ const (
var ( var (
// NetworkPluginOperationsLatency collects operation latency numbers by operation // NetworkPluginOperationsLatency collects operation latency numbers by operation
// type. // type.
NetworkPluginOperationsLatency = prometheus.NewSummaryVec( NetworkPluginOperationsLatency = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: kubeletSubsystem, Subsystem: kubeletSubsystem,
Name: NetworkPluginOperationsLatencyKey, Name: NetworkPluginOperationsLatencyKey,
Help: "Latency in seconds of network plugin operations. Broken down by operation type.", Help: "Latency in seconds of network plugin operations. Broken down by operation type.",
Buckets: prometheus.DefBuckets,
}, },
[]string{"operation_type"}, []string{"operation_type"},
) )