From 3b415ef3fd3dacc5300bd47e8d2010c3088a2576 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Fri, 21 Apr 2017 15:01:31 -0500 Subject: [PATCH] Simplify stats naming --- handler.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/handler.go b/handler.go index 014afea17..55ca9199d 100644 --- a/handler.go +++ b/handler.go @@ -122,7 +122,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } pathParts := strings.Split(r.URL.Path, "/") - endpointName := strings.Join(pathParts, ".") + endpointName := strings.Join(pathParts, "_") if externalPrefixFlag[pathParts[1]] { statsTags = append(statsTags, "external") @@ -132,8 +132,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { statsTags = append(statsTags, "useragent:"+r.UserAgent()) stats := h.Index.Stats.WithTags(statsTags...) - stats.Count("http.count"+endpointName, 1) - stats.Histogram("http.duration"+endpointName, dif) + stats.Histogram("http_"+endpointName, dif) } // handleGetSchema handles GET /schema requests.