@@ -34,15 +34,6 @@ const (
34
34
// DockerOperationsTimeoutKey is the key for the operation timeout metrics.
35
35
DockerOperationsTimeoutKey = "docker_operations_timeout_total"
36
36
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
-
46
37
// Keep the "kubelet" subsystem for backward compatibility.
47
38
kubeletSubsystem = "kubelet"
48
39
)
91
82
},
92
83
[]string {"operation_type" },
93
84
)
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
- )
141
85
)
142
86
143
87
var registerMetrics sync.Once
@@ -149,18 +93,9 @@ func Register() {
149
93
legacyregistry .MustRegister (DockerOperations )
150
94
legacyregistry .MustRegister (DockerOperationsErrors )
151
95
legacyregistry .MustRegister (DockerOperationsTimeout )
152
- legacyregistry .MustRegister (DeprecatedDockerOperationsLatency )
153
- legacyregistry .MustRegister (DeprecatedDockerOperations )
154
- legacyregistry .MustRegister (DeprecatedDockerOperationsErrors )
155
- legacyregistry .MustRegister (DeprecatedDockerOperationsTimeout )
156
96
})
157
97
}
158
98
159
- // SinceInMicroseconds gets the time since the specified start in microseconds.
160
- func SinceInMicroseconds (start time.Time ) float64 {
161
- return float64 (time .Since (start ).Nanoseconds () / time .Microsecond .Nanoseconds ())
162
- }
163
-
164
99
// SinceInSeconds gets the time since the specified start in seconds.
165
100
func SinceInSeconds (start time.Time ) float64 {
166
101
return time .Since (start ).Seconds ()
0 commit comments