Skip to content
Permalink
Browse files

Merge pull request #83278 from RainbowMango/pr_remove_direct_referenc…

…e_to_prometheus_from_aws

Remove direct reference to prometheus from aws
  • Loading branch information...
k8s-ci-robot committed Oct 15, 2019
2 parents 39929d8 + 0bccce8 commit 184769bd5ee06aae7510c0ca6afc867cb58c7b9d
@@ -66,7 +66,6 @@ go_library(
"//vendor/github.com/aws/aws-sdk-go/service/elbv2:go_default_library",
"//vendor/github.com/aws/aws-sdk-go/service/kms:go_default_library",
"//vendor/github.com/aws/aws-sdk-go/service/sts:go_default_library",
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
"//vendor/gopkg.in/gcfg.v1:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
],
@@ -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
@@ -16,7 +16,6 @@ require (
github.com/dnaeon/go-vcr v1.0.1 // indirect
github.com/gophercloud/gophercloud v0.1.0
github.com/mitchellh/mapstructure v1.1.2
github.com/prometheus/client_golang v0.9.4
github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c
github.com/satori/go.uuid v1.2.0 // indirect
github.com/stretchr/testify v1.3.0

0 comments on commit 184769b

Please sign in to comment.
You can’t perform that action at this time.