From 2d26de50559d8acb82ea803764e138325d95572c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Thu, 19 Feb 2026 09:03:15 +0100 Subject: [PATCH] fix(metrics): adjust build duration histogram buckets for better resolution Add lower buckets (5s, 10s) for cached builds and higher buckets (7200s, 14400s) for cold builds up to the 4h timeout. Co-Authored-By: Claude Opus 4.6 --- cmd/homelab-deploy/main.go | 2 +- internal/metrics/build_metrics.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/homelab-deploy/main.go b/cmd/homelab-deploy/main.go index dd2c3fb..c2e18b3 100644 --- a/cmd/homelab-deploy/main.go +++ b/cmd/homelab-deploy/main.go @@ -17,7 +17,7 @@ import ( "github.com/urfave/cli/v3" ) -const version = "0.2.3" +const version = "0.2.4" func main() { app := &cli.Command{ diff --git a/internal/metrics/build_metrics.go b/internal/metrics/build_metrics.go index c194dc4..3dba305 100644 --- a/internal/metrics/build_metrics.go +++ b/internal/metrics/build_metrics.go @@ -35,7 +35,7 @@ func NewBuildCollector(reg prometheus.Registerer) *BuildCollector { prometheus.HistogramOpts{ Name: "homelab_deploy_build_duration_seconds", Help: "Build execution time per host", - Buckets: []float64{30, 60, 120, 300, 600, 900, 1200, 1800, 3600}, + Buckets: []float64{5, 10, 30, 60, 120, 300, 600, 1800, 3600, 7200, 14400}, }, []string{"repo", "host"}, ),