Skip to content

Commit

Permalink
Merge pull request #361 from mogren/enable-aws-prometheus
Browse files Browse the repository at this point in the history
Actually enable prometheus metrics
  • Loading branch information
tiffanyfay authored Mar 28, 2019
2 parents 20b9b20 + d61af27 commit 8b09809
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 @@ -188,13 +188,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 8b09809

Please sign in to comment.