Skip to content

Commit

Permalink
Actually enable prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Claes Mogren committed Mar 25, 2019
1 parent 931d265 commit d61af27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/awsutils/awsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d61af27

Please sign in to comment.