diff --git a/pkg/awsutils/awsutils.go b/pkg/awsutils/awsutils.go index c5740d301e..3ac808c14e 100644 --- a/pkg/awsutils/awsutils.go +++ b/pkg/awsutils/awsutils.go @@ -187,13 +187,14 @@ func prometheusRegister() { prometheus.MustRegister(awsAPILatency) prometheus.MustRegister(awsAPIErr) prometheus.MustRegister(awsUtilsErr) - prometheusRegistered = false + prometheusRegistered = true } } // New creates an EC2InstanceMetadataCache func New() (*EC2InstanceMetadataCache, error) { // Initializes prometheus metrics + prometheusRegister() cache := &EC2InstanceMetadataCache{} cache.ec2Metadata = ec2metadata.New()