From 96a930c9bf3b52f05676cfc0410f15bd7ecfb447 Mon Sep 17 00:00:00 2001 From: RainbowMango Date: Sun, 29 Sep 2019 10:06:59 +0800 Subject: [PATCH] Remove direct reference to Prometheus. --- .../src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go index 90153ec35ce..6d6789edbd7 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go @@ -21,8 +21,6 @@ package aws import ( "sync" - "github.com/prometheus/client_golang/prometheus" - "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" ) @@ -55,14 +53,14 @@ var ( func recordAWSMetric(actionName string, timeTaken float64, err error) { if err != nil { - awsAPIErrorMetric.With(prometheus.Labels{"request": actionName}).Inc() + awsAPIErrorMetric.With(metrics.Labels{"request": actionName}).Inc() } else { - awsAPIMetric.With(prometheus.Labels{"request": actionName}).Observe(timeTaken) + awsAPIMetric.With(metrics.Labels{"request": actionName}).Observe(timeTaken) } } func recordAWSThrottlesMetric(operation string) { - awsAPIThrottlesMetric.With(prometheus.Labels{"operation_name": operation}).Inc() + awsAPIThrottlesMetric.With(metrics.Labels{"operation_name": operation}).Inc() } var registerOnce sync.Once