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 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 09:03:15 +01:00
parent e5e8be86ec
commit 2d26de5055
2 changed files with 2 additions and 2 deletions

View File

@@ -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{

View File

@@ -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"},
),