mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-29 02:31:00 +00:00
Merge pull request #4 from prometheus/beorn7/new-register-call
Adjust call syntax of Register to the new client_golang.
This commit is contained in:
commit
1b22e2fae8
1 changed files with 3 additions and 3 deletions
|
@ -71,7 +71,7 @@ func (c *CounterContainer) Get(metricName string, labels prometheus.Labels) prom
|
||||||
ConstLabels: labels,
|
ConstLabels: labels,
|
||||||
})
|
})
|
||||||
c.Elements[hash] = counter
|
c.Elements[hash] = counter
|
||||||
if _, err := prometheus.Register(counter); err != nil {
|
if err := prometheus.Register(counter); err != nil {
|
||||||
log.Fatalf(regErrF, metricName, err)
|
log.Fatalf(regErrF, metricName, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ func (c *GaugeContainer) Get(metricName string, labels prometheus.Labels) promet
|
||||||
ConstLabels: labels,
|
ConstLabels: labels,
|
||||||
})
|
})
|
||||||
c.Elements[hash] = gauge
|
c.Elements[hash] = gauge
|
||||||
if _, err := prometheus.Register(gauge); err != nil {
|
if err := prometheus.Register(gauge); err != nil {
|
||||||
log.Fatalf(regErrF, metricName, err)
|
log.Fatalf(regErrF, metricName, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ func (c *SummaryContainer) Get(metricName string, labels prometheus.Labels) prom
|
||||||
ConstLabels: labels,
|
ConstLabels: labels,
|
||||||
})
|
})
|
||||||
c.Elements[hash] = summary
|
c.Elements[hash] = summary
|
||||||
if _, err := prometheus.Register(summary); err != nil {
|
if err := prometheus.Register(summary); err != nil {
|
||||||
log.Fatalf(regErrF, metricName, err)
|
log.Fatalf(regErrF, metricName, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue