mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Simplify stats naming
This commit is contained in:
parent
78704dc55a
commit
3b415ef3fd
1 changed files with 2 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue