Skip to content

Commit 8ae3f80

Browse files
committed
remove deprecated metrics of dockershim
1 parent 060756b commit 8ae3f80

File tree

4 files changed

+0
-81
lines changed

4 files changed

+0
-81
lines changed

pkg/kubelet/dockershim/libdocker/instrumented_client.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,17 @@ func NewInstrumentedInterface(dockerClient Interface) Interface {
4242
// recordOperation records the duration of the operation.
4343
func recordOperation(operation string, start time.Time) {
4444
metrics.DockerOperations.WithLabelValues(operation).Inc()
45-
metrics.DeprecatedDockerOperations.WithLabelValues(operation).Inc()
4645
metrics.DockerOperationsLatency.WithLabelValues(operation).Observe(metrics.SinceInSeconds(start))
47-
metrics.DeprecatedDockerOperationsLatency.WithLabelValues(operation).Observe(metrics.SinceInMicroseconds(start))
4846
}
4947

5048
// recordError records error for metric if an error occurred.
5149
func recordError(operation string, err error) {
5250
if err != nil {
5351
if _, ok := err.(operationTimeout); ok {
5452
metrics.DockerOperationsTimeout.WithLabelValues(operation).Inc()
55-
metrics.DeprecatedDockerOperationsTimeout.WithLabelValues(operation).Inc()
5653
}
5754
// Docker operation timeout error is also a docker error, so we don't add else here.
5855
metrics.DockerOperationsErrors.WithLabelValues(operation).Inc()
59-
metrics.DeprecatedDockerOperationsErrors.WithLabelValues(operation).Inc()
6056
}
6157
}
6258

pkg/kubelet/dockershim/metrics/metrics.go

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ const (
3434
// DockerOperationsTimeoutKey is the key for the operation timeout metrics.
3535
DockerOperationsTimeoutKey = "docker_operations_timeout_total"
3636

37-
// DeprecatedDockerOperationsKey is the deprecated key for docker operation metrics.
38-
DeprecatedDockerOperationsKey = "docker_operations"
39-
// DeprecatedDockerOperationsLatencyKey is the deprecated key for the operation latency metrics.
40-
DeprecatedDockerOperationsLatencyKey = "docker_operations_latency_microseconds"
41-
// DeprecatedDockerOperationsErrorsKey is the deprecated key for the operation error metrics.
42-
DeprecatedDockerOperationsErrorsKey = "docker_operations_errors"
43-
// DeprecatedDockerOperationsTimeoutKey is the deprecated key for the operation timeout metrics.
44-
DeprecatedDockerOperationsTimeoutKey = "docker_operations_timeout"
45-
4637
// Keep the "kubelet" subsystem for backward compatibility.
4738
kubeletSubsystem = "kubelet"
4839
)
@@ -91,53 +82,6 @@ var (
9182
},
9283
[]string{"operation_type"},
9384
)
94-
95-
// DeprecatedDockerOperationsLatency collects operation latency numbers by operation
96-
// type.
97-
DeprecatedDockerOperationsLatency = metrics.NewSummaryVec(
98-
&metrics.SummaryOpts{
99-
Subsystem: kubeletSubsystem,
100-
Name: DeprecatedDockerOperationsLatencyKey,
101-
Help: "Latency in microseconds of Docker operations. Broken down by operation type.",
102-
StabilityLevel: metrics.ALPHA,
103-
DeprecatedVersion: "1.14.0",
104-
},
105-
[]string{"operation_type"},
106-
)
107-
// DeprecatedDockerOperations collects operation counts by operation type.
108-
DeprecatedDockerOperations = metrics.NewCounterVec(
109-
&metrics.CounterOpts{
110-
Subsystem: kubeletSubsystem,
111-
Name: DeprecatedDockerOperationsKey,
112-
Help: "Cumulative number of Docker operations by operation type.",
113-
StabilityLevel: metrics.ALPHA,
114-
DeprecatedVersion: "1.14.0",
115-
},
116-
[]string{"operation_type"},
117-
)
118-
// DeprecatedDockerOperationsErrors collects operation errors by operation
119-
// type.
120-
DeprecatedDockerOperationsErrors = metrics.NewCounterVec(
121-
&metrics.CounterOpts{
122-
Subsystem: kubeletSubsystem,
123-
Name: DeprecatedDockerOperationsErrorsKey,
124-
Help: "Cumulative number of Docker operation errors by operation type.",
125-
StabilityLevel: metrics.ALPHA,
126-
DeprecatedVersion: "1.14.0",
127-
},
128-
[]string{"operation_type"},
129-
)
130-
// DeprecatedDockerOperationsTimeout collects operation timeouts by operation type.
131-
DeprecatedDockerOperationsTimeout = metrics.NewCounterVec(
132-
&metrics.CounterOpts{
133-
Subsystem: kubeletSubsystem,
134-
Name: DeprecatedDockerOperationsTimeoutKey,
135-
Help: "Cumulative number of Docker operation timeout by operation type.",
136-
StabilityLevel: metrics.ALPHA,
137-
DeprecatedVersion: "1.14.0",
138-
},
139-
[]string{"operation_type"},
140-
)
14185
)
14286

14387
var registerMetrics sync.Once
@@ -149,10 +93,6 @@ func Register() {
14993
legacyregistry.MustRegister(DockerOperations)
15094
legacyregistry.MustRegister(DockerOperationsErrors)
15195
legacyregistry.MustRegister(DockerOperationsTimeout)
152-
legacyregistry.MustRegister(DeprecatedDockerOperationsLatency)
153-
legacyregistry.MustRegister(DeprecatedDockerOperations)
154-
legacyregistry.MustRegister(DeprecatedDockerOperationsErrors)
155-
legacyregistry.MustRegister(DeprecatedDockerOperationsTimeout)
15696
})
15797
}
15898

pkg/kubelet/dockershim/network/metrics/metrics.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ const (
2929
NetworkPluginOperationsKey = "network_plugin_operations"
3030
// NetworkPluginOperationsLatencyKey is the key for the operation latency metrics.
3131
NetworkPluginOperationsLatencyKey = "network_plugin_operations_duration_seconds"
32-
// DeprecatedNetworkPluginOperationsLatencyKey is the deprecated key for the operation latency metrics.
33-
DeprecatedNetworkPluginOperationsLatencyKey = "network_plugin_operations_latency_microseconds"
3432

3533
// Keep the "kubelet" subsystem for backward compatibility.
3634
kubeletSubsystem = "kubelet"
@@ -49,19 +47,6 @@ var (
4947
},
5048
[]string{"operation_type"},
5149
)
52-
53-
// DeprecatedNetworkPluginOperationsLatency collects operation latency numbers by operation
54-
// type.
55-
DeprecatedNetworkPluginOperationsLatency = metrics.NewSummaryVec(
56-
&metrics.SummaryOpts{
57-
Subsystem: kubeletSubsystem,
58-
Name: DeprecatedNetworkPluginOperationsLatencyKey,
59-
Help: "Latency in microseconds of network plugin operations. Broken down by operation type.",
60-
StabilityLevel: metrics.ALPHA,
61-
DeprecatedVersion: "1.14.0",
62-
},
63-
[]string{"operation_type"},
64-
)
6550
)
6651

6752
var registerMetrics sync.Once
@@ -70,7 +55,6 @@ var registerMetrics sync.Once
7055
func Register() {
7156
registerMetrics.Do(func() {
7257
legacyregistry.MustRegister(NetworkPluginOperationsLatency)
73-
legacyregistry.MustRegister(DeprecatedNetworkPluginOperationsLatency)
7458
})
7559
}
7660

pkg/kubelet/dockershim/network/plugins.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ func (pm *PluginManager) podUnlock(fullPodName string) {
381381
// recordOperation records operation and duration
382382
func recordOperation(operation string, start time.Time) {
383383
metrics.NetworkPluginOperationsLatency.WithLabelValues(operation).Observe(metrics.SinceInSeconds(start))
384-
metrics.DeprecatedNetworkPluginOperationsLatency.WithLabelValues(operation).Observe(metrics.SinceInMicroseconds(start))
385384
}
386385

387386
func (pm *PluginManager) GetPodNetworkStatus(podNamespace, podName string, id kubecontainer.ContainerID) (*PodNetworkStatus, error) {

0 commit comments

Comments
 (0)