prometheus: compose latency metric

Add metric to measure the latency
of requests made to the composer
cloud api.
This commit is contained in:
Gianluca Zuccarelli 2021-10-29 13:16:15 +01:00 committed by Tom Gundersen
parent f749078b0d
commit dfa6a48f5d

View file

@ -32,3 +32,11 @@ var (
Help: "total number of failed compose requests",
})
)
var (
httpDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
Name: "composer_http_duration_seconds",
Help: "Duration of HTTP requests.",
Buckets: []float64{.025, .05, .075, .1, .2, .5, .75, 1, 1.5, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 20},
}, []string{"path"})
)