good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 62379f02 authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

metrics/influxdb: don't push empty histograms, no measurement != 0

parent cae6b552
Branches
Tags
No related merge requests found
......@@ -162,6 +162,8 @@ func (r *reporter) send() error {
})
case metrics.Histogram:
ms := metric.Snapshot()
if ms.Count() > 0 {
ps := ms.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999, 0.9999})
pts = append(pts, client.Point{
Measurement: fmt.Sprintf("%s%s.histogram", namespace, name),
......@@ -182,6 +184,7 @@ func (r *reporter) send() error {
},
Time: now,
})
}
case metrics.Meter:
ms := metric.Snapshot()
pts = append(pts, client.Point{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment