1
0
Fork 0

add status code to request duration metric

This commit is contained in:
Marco Jantke 2017-06-15 16:06:02 +02:00 committed by Ludovic Fernandez
parent 34e60a8404
commit 0055965295
3 changed files with 9 additions and 5 deletions

View file

@ -17,7 +17,7 @@ const (
// Prometheus is an Implementation for Metrics that exposes the following Prometheus metrics:
// - number of requests partitioned by status code and method
// - request durations
// - request durations partitioned by status code
// - amount of retries happened
type Prometheus struct {
reqsCounter metrics.Counter
@ -73,7 +73,7 @@ func NewPrometheus(name string, config *types.Prometheus) (*Prometheus, []stdpro
ConstLabels: stdprometheus.Labels{"service": name},
Buckets: buckets,
},
[]string{},
[]string{"code"},
)
hv, err = registerHistogramVec(hv)
if err != nil {