Adjust call syntax of Register to the new client_golang.

This commit is contained in:
Bjoern Rabenstein 2015-01-12 19:14:29 +01:00
parent 609bc94bc7
commit 1c567153ab

View file

@ -71,7 +71,7 @@ func (c *CounterContainer) Get(metricName string, labels prometheus.Labels) prom
ConstLabels: labels,
})
c.Elements[hash] = counter
if _, err := prometheus.Register(counter); err != nil {
if err := prometheus.Register(counter); err != nil {
log.Fatalf(regErrF, metricName, err)
}
}
@ -98,7 +98,7 @@ func (c *GaugeContainer) Get(metricName string, labels prometheus.Labels) promet
ConstLabels: labels,
})
c.Elements[hash] = gauge
if _, err := prometheus.Register(gauge); err != nil {
if err := prometheus.Register(gauge); err != nil {
log.Fatalf(regErrF, metricName, err)
}
}
@ -126,7 +126,7 @@ func (c *SummaryContainer) Get(metricName string, labels prometheus.Labels) prom
ConstLabels: labels,
})
c.Elements[hash] = summary
if _, err := prometheus.Register(summary); err != nil {
if err := prometheus.Register(summary); err != nil {
log.Fatalf(regErrF, metricName, err)
}
}