diff --git a/pkg/registry/core/pod/rest/log.go b/pkg/registry/core/pod/rest/log.go index 6ced8413670..eb872337fef 100644 --- a/pkg/registry/core/pod/rest/log.go +++ b/pkg/registry/core/pod/rest/log.go @@ -118,12 +118,7 @@ func countSkipTLSMetric(insecureSkipTLSVerifyBackend bool) { } counter.Inc() - deprecatedCounter, err := deprecatedPodLogsUsage.GetMetricWithLabelValues(usageType) - if err != nil { - utilruntime.HandleError(err) - return - } - deprecatedCounter.Inc() + deprecatedPodLogsUsage.WithLabelValues(usageType).Inc() } // NewGetOptions creates a new options object