Double-books the HTTP metrics w/ and w/o the "consul" prefix.

Fixes #3654
This commit is contained in:
James Phillips 2017-11-07 16:32:45 -08:00
parent 22ec30df9b
commit d938493671
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
wrapper := func(resp http.ResponseWriter, req *http.Request) {
start := time.Now()
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)
}
mux.HandleFunc(pattern, wrapper)