Merge pull request #83278 from RainbowMango/pr_remove_direct_reference_to_prometheus_from_aws

Remove direct reference to prometheus from aws
This commit is contained in:
Kubernetes Prow Robot 2019-10-15 01:15:52 -07:00 committed by GitHub
commit 184769bd5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View File

@ -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",
],

View File

@ -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

View File

@ -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