From 9f711d57eb7de4900e2291117d1f171d481d025d Mon Sep 17 00:00:00 2001 From: Shawn Smith Date: Thu, 8 Aug 2019 18:34:09 +0900 Subject: [PATCH] more specific logging --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index dc8a968..2fcc3b2 100644 --- a/main.go +++ b/main.go @@ -108,7 +108,7 @@ func (m metrics) recordDuration(start time.Time, name string) { // instrument adds metric instrumentation to the handler passed in as argument func (m metrics) instrument(path string, h http.HandlerFunc) (string, http.HandlerFunc) { return path, func(w http.ResponseWriter, r *http.Request) { - defer m.recordDuration(time.Now(), path) + defer m.recordDuration(time.Now(), r.URL.Path) h.ServeHTTP(w, r) } }