Skip to content

Commit 184769b

Browse files
authored
Merge pull request kubernetes#83278 from RainbowMango/pr_remove_direct_reference_to_prometheus_from_aws
Remove direct reference to prometheus from aws
2 parents 39929d8 + 0bccce8 commit 184769b

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

staging/src/k8s.io/legacy-cloud-providers/aws/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ go_library(
6666
"//vendor/github.com/aws/aws-sdk-go/service/elbv2:go_default_library",
6767
"//vendor/github.com/aws/aws-sdk-go/service/kms:go_default_library",
6868
"//vendor/github.com/aws/aws-sdk-go/service/sts:go_default_library",
69-
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
7069
"//vendor/gopkg.in/gcfg.v1:go_default_library",
7170
"//vendor/k8s.io/klog:go_default_library",
7271
],

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

staging/src/k8s.io/legacy-cloud-providers/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ require (
1616
github.com/dnaeon/go-vcr v1.0.1 // indirect
1717
github.com/gophercloud/gophercloud v0.1.0
1818
github.com/mitchellh/mapstructure v1.1.2
19-
github.com/prometheus/client_golang v0.9.4
2019
github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c
2120
github.com/satori/go.uuid v1.2.0 // indirect
2221
github.com/stretchr/testify v1.3.0

0 commit comments

Comments
 (0)