From 6628a4b5afd4f3d0ac029f97f3c9e270a72c0ae8 Mon Sep 17 00:00:00 2001 From: Calle Pettersson Date: Fri, 25 Sep 2020 09:48:54 +0200 Subject: [PATCH] feat(backend): use fewer histogram buckets for request latency Default buckets cover up to 10 seconds, which is unnecessarily wide --- cmd/karma/exporter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/karma/exporter.go b/cmd/karma/exporter.go index 63516fcc4..fee3e03fd 100644 --- a/cmd/karma/exporter.go +++ b/cmd/karma/exporter.go @@ -23,8 +23,9 @@ var ( reqDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ - Name: "http_request_duration_seconds", - Help: "HTTP request latencies in seconds.", + Name: "http_request_duration_seconds", + Help: "HTTP request latencies in seconds.", + Buckets: []float64{0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1}, }, labels, )