From ba9bb98b9d1618e69078036123ab21ab2319c7d5 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Tue, 15 Mar 2022 22:29:11 +0100 Subject: [PATCH] Fix histogram bucket config Fix hard-coded buckets. Fixes: https://github.com/SuperQ/smokeping_prober/issues/64 Signed-off-by: SuperQ --- CHANGELOG.md | 2 ++ collector.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0df39f..e24e0a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * [ENHANCEMENT] * [BUGFIX] +* [BUGFIX] Fix histogram buckets #65 + # 0.5.0 / 2021-12-19 * [FEATURE] Support loading targets from a config file #54 diff --git a/collector.go b/collector.go index 52aa4d3..8c6d327 100644 --- a/collector.go +++ b/collector.go @@ -53,7 +53,7 @@ func newPingResponseHistogram(buckets []float64) *prometheus.HistogramVec { Namespace: namespace, Name: "response_duration_seconds", Help: "A histogram of latencies for ping responses.", - Buckets: prometheus.ExponentialBuckets(0.00025, 2, 16), + Buckets: buckets, }, labelNames, )