refactor FilerRequest metrics (#3402)

* refactor FilerRequest metrics

* avoid double count proxy

* defer to
This commit is contained in:
Konstantin Lebedev
2022-08-04 13:44:54 +05:00
committed by GitHub
parent bd13a7968f
commit 22181dd018
8 changed files with 44 additions and 45 deletions

View File

@@ -18,7 +18,7 @@ import (
// is empty.
func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Request) {
stats.FilerRequestCounter.WithLabelValues("list").Inc()
stats.FilerRequestCounter.WithLabelValues(stats.DirList).Inc()
path := r.URL.Path
if strings.HasSuffix(path, "/") && len(path) > 1 {