diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index ed906ee7a..9c2398bc8 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -41,11 +41,9 @@ type Metrics struct { Latency *prometheus.HistogramVec EC2DescribeInstanceCallCount prometheus.Counter StsConnectionFailure *prometheus.CounterVec - StsConnectionFailure *prometheus.CounterVec StsResponses *prometheus.CounterVec DynamicFileFailures prometheus.Counter StsThrottling *prometheus.CounterVec - StsThrottling *prometheus.CounterVec E2ELatency *prometheus.HistogramVec DynamicFileEnabled prometheus.Gauge DynamicFileOnly prometheus.Gauge @@ -69,23 +67,19 @@ func createMetrics(reg prometheus.Registerer) Metrics { Help: "Dynamic file failures", }, ), - StsConnectionFailure: factory.NewCounterVec( StsConnectionFailure: factory.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Name: "sts_connection_failures_total", Help: "Sts call could not succeed or timedout", }, []string{"StsEndpointType"}, - }, []string{"StsEndpointType"}, ), - StsThrottling: factory.NewCounterVec( StsThrottling: factory.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Name: "sts_throttling_total", Help: "Sts call got throttled", }, []string{"StsEndpointType"}, - }, []string{"StsEndpointType"}, ), StsResponses: factory.NewCounterVec( prometheus.CounterOpts{ @@ -93,7 +87,6 @@ func createMetrics(reg prometheus.Registerer) Metrics { Name: "sts_responses_total", Help: "Sts responses with error code label", }, []string{"ResponseCode", "StsEndpointType"}, - }, []string{"ResponseCode", "StsEndpointType"}, ), Latency: factory.NewHistogramVec( prometheus.HistogramOpts{ diff --git a/pkg/token/token.go b/pkg/token/token.go index daf8eba94..4b42bebb6 100644 --- a/pkg/token/token.go +++ b/pkg/token/token.go @@ -568,6 +568,7 @@ func (v tokenVerifier) Verify(token string) (*Identity, error) { stsEndpointType := metrics.STSRegional if parsedURL.Host == "sts.amazonaws.com" { stsEndpointType = metrics.STSGlobal + } logrus.Infof("Sending request to %s endpoint, host: %s", stsEndpointType, parsedURL.Host)