mirror of https://github.com/status-im/consul.git
Double-books the HTTP metrics w/ and w/o the "consul" prefix.
Fixes #3654
This commit is contained in:
parent
c6c7b8fa6b
commit
099b143838
|
@ -67,7 +67,8 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
|
||||||
wrapper := func(resp http.ResponseWriter, req *http.Request) {
|
wrapper := func(resp http.ResponseWriter, req *http.Request) {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
handler(resp, req)
|
handler(resp, req)
|
||||||
key := append([]string{"consul", "http", req.Method}, parts...)
|
key := append([]string{"http", req.Method}, parts...)
|
||||||
|
metrics.MeasureSince(append([]string{"consul"}, key...), start)
|
||||||
metrics.MeasureSince(key, start)
|
metrics.MeasureSince(key, start)
|
||||||
}
|
}
|
||||||
mux.HandleFunc(pattern, wrapper)
|
mux.HandleFunc(pattern, wrapper)
|
||||||
|
|
Loading…
Reference in New Issue