Skip to content

Commit 447b175

Browse files
committed
remove deprecated metrics of etcd
1 parent 1a9b121 commit 447b175

File tree

1 file changed

+0
-21
lines changed
  • staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics

1 file changed

+0
-21
lines changed

staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ var (
4949
},
5050
[]string{"resource"},
5151
)
52-
53-
deprecatedEtcdRequestLatenciesSummary = compbasemetrics.NewSummaryVec(
54-
&compbasemetrics.SummaryOpts{
55-
Name: "etcd_request_latencies_summary",
56-
Help: "Etcd request latency summary in microseconds for each operation and object type.",
57-
StabilityLevel: compbasemetrics.ALPHA,
58-
DeprecatedVersion: "1.14.0",
59-
},
60-
[]string{"operation", "type"},
61-
)
6252
)
6353

6454
var registerMetrics sync.Once
@@ -69,9 +59,6 @@ func Register() {
6959
registerMetrics.Do(func() {
7060
legacyregistry.MustRegister(etcdRequestLatency)
7161
legacyregistry.MustRegister(objectCounts)
72-
73-
// TODO(danielqsj): Remove the following metrics, they are deprecated
74-
legacyregistry.MustRegister(deprecatedEtcdRequestLatenciesSummary)
7562
})
7663
}
7764

@@ -83,19 +70,11 @@ func UpdateObjectCount(resourcePrefix string, count int64) {
8370
// RecordEtcdRequestLatency sets the etcd_request_duration_seconds metrics.
8471
func RecordEtcdRequestLatency(verb, resource string, startTime time.Time) {
8572
etcdRequestLatency.WithLabelValues(verb, resource).Observe(sinceInSeconds(startTime))
86-
deprecatedEtcdRequestLatenciesSummary.WithLabelValues(verb, resource).Observe(sinceInMicroseconds(startTime))
8773
}
8874

8975
// Reset resets the etcd_request_duration_seconds metric.
9076
func Reset() {
9177
etcdRequestLatency.Reset()
92-
93-
deprecatedEtcdRequestLatenciesSummary.Reset()
94-
}
95-
96-
// sinceInMicroseconds gets the time since the specified start in microseconds.
97-
func sinceInMicroseconds(start time.Time) float64 {
98-
return float64(time.Since(start).Nanoseconds() / time.Microsecond.Nanoseconds())
9978
}
10079

10180
// sinceInSeconds gets the time since the specified start in seconds.

0 commit comments

Comments
 (0)