From 3b3ffe0d08d02373ecb6eda6ae7c328e66bf3500 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Thu, 27 Jun 2024 14:15:41 +0200 Subject: [PATCH] internal/prometheus: more human-readable time buckets Let's make them slightly easier to query and reason about. From 100 ms to 24 hours. --- internal/prometheus/job_metrics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/prometheus/job_metrics.go b/internal/prometheus/job_metrics.go index 9de8799b81..3ee9493721 100644 --- a/internal/prometheus/job_metrics.go +++ b/internal/prometheus/job_metrics.go @@ -41,7 +41,7 @@ var ( Namespace: Namespace, Subsystem: WorkerSubsystem, Help: "Duration spent by workers on a job.", - Buckets: []float64{.1, .2, .5, 1, 2, 4, 8, 16, 32, 40, 48, 64, 96, 128, 160, 192, 224, 256, 320, 382, 448, 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 10752}, + Buckets: []float64{.1, .2, .5, 1, 2.5, 5, 10, 20, 30, 40, 60, 90, 120, 150, 180, 240, 300, 360, 420, 480, 540, 600, 720, 840, 960, 1080, 1200, 1320, 1440, 1560, 1680, 1800, 2100, 2400, 2700, 3000, 3600, 4800, 6000, 7200, 9000, 10800, 12600, 14400, 16200, 18000, 19800, 24000, 27000, 30000, 33000, 36000, 39600, 43200, 57600, 86400}, }, []string{"type", "status", "tenant", "arch"}) ) @@ -51,7 +51,7 @@ var ( Namespace: Namespace, Subsystem: WorkerSubsystem, Help: "Duration a job spends on the queue.", - Buckets: []float64{.1, .2, .5, 1, 2, 4, 8, 16, 32, 40, 48, 64, 96, 128, 160, 192, 224, 256, 320, 382, 448, 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096, 4608, 5120, 5632, 6144, 6656, 7168, 7680, 8192, 8704, 9216, 9728, 10240, 10752}, + Buckets: []float64{.1, .2, .5, 1, 2.5, 5, 10, 20, 30, 40, 60, 90, 120, 150, 180, 240, 300, 360, 420, 480, 540, 600, 720, 840, 960, 1080, 1200, 1320, 1440, 1560, 1680, 1800, 2100, 2400, 2700, 3000, 3600, 4800, 6000, 7200, 9000, 10800, 12600, 14400, 16200, 18000, 19800, 24000, 27000, 30000, 33000, 36000, 39600, 43200, 57600, 86400}, }, []string{"type", "tenant", "arch"}) )