Skip to content

Commit 96a930c

Browse files
committed
Remove direct reference to Prometheus.
1 parent 29f23e6 commit 96a930c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ package aws
2121
import (
2222
"sync"
2323

24-
"github.com/prometheus/client_golang/prometheus"
25-
2624
"k8s.io/component-base/metrics"
2725
"k8s.io/component-base/metrics/legacyregistry"
2826
)
@@ -55,14 +53,14 @@ var (
5553

5654
func recordAWSMetric(actionName string, timeTaken float64, err error) {
5755
if err != nil {
58-
awsAPIErrorMetric.With(prometheus.Labels{"request": actionName}).Inc()
56+
awsAPIErrorMetric.With(metrics.Labels{"request": actionName}).Inc()
5957
} else {
60-
awsAPIMetric.With(prometheus.Labels{"request": actionName}).Observe(timeTaken)
58+
awsAPIMetric.With(metrics.Labels{"request": actionName}).Observe(timeTaken)
6159
}
6260
}
6361

6462
func recordAWSThrottlesMetric(operation string) {
65-
awsAPIThrottlesMetric.With(prometheus.Labels{"operation_name": operation}).Inc()
63+
awsAPIThrottlesMetric.With(metrics.Labels{"operation_name": operation}).Inc()
6664
}
6765

6866
var registerOnce sync.Once

0 commit comments

Comments
 (0)