mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
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:
commit
184769bd5e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user