|
@ -35,11 +35,11 @@ func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { |
|
|
switch r.Method { |
|
|
switch r.Method { |
|
|
case "GET": |
|
|
case "GET": |
|
|
stats.FilerRequestCounter.WithLabelValues("get").Inc() |
|
|
stats.FilerRequestCounter.WithLabelValues("get").Inc() |
|
|
fs.GetOrHeadHandler(w, r, true) |
|
|
|
|
|
|
|
|
fs.GetOrHeadHandler(w, r) |
|
|
stats.FilerRequestHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) |
|
|
stats.FilerRequestHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) |
|
|
case "HEAD": |
|
|
case "HEAD": |
|
|
stats.FilerRequestCounter.WithLabelValues("head").Inc() |
|
|
stats.FilerRequestCounter.WithLabelValues("head").Inc() |
|
|
fs.GetOrHeadHandler(w, r, false) |
|
|
|
|
|
|
|
|
fs.GetOrHeadHandler(w, r) |
|
|
stats.FilerRequestHistogram.WithLabelValues("head").Observe(time.Since(start).Seconds()) |
|
|
stats.FilerRequestHistogram.WithLabelValues("head").Observe(time.Since(start).Seconds()) |
|
|
case "DELETE": |
|
|
case "DELETE": |
|
|
stats.FilerRequestCounter.WithLabelValues("delete").Inc() |
|
|
stats.FilerRequestCounter.WithLabelValues("delete").Inc() |
|
@ -95,11 +95,11 @@ func (fs *FilerServer) readonlyFilerHandler(w http.ResponseWriter, r *http.Reque |
|
|
switch r.Method { |
|
|
switch r.Method { |
|
|
case "GET": |
|
|
case "GET": |
|
|
stats.FilerRequestCounter.WithLabelValues("get").Inc() |
|
|
stats.FilerRequestCounter.WithLabelValues("get").Inc() |
|
|
fs.GetOrHeadHandler(w, r, true) |
|
|
|
|
|
|
|
|
fs.GetOrHeadHandler(w, r) |
|
|
stats.FilerRequestHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) |
|
|
stats.FilerRequestHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) |
|
|
case "HEAD": |
|
|
case "HEAD": |
|
|
stats.FilerRequestCounter.WithLabelValues("head").Inc() |
|
|
stats.FilerRequestCounter.WithLabelValues("head").Inc() |
|
|
fs.GetOrHeadHandler(w, r, false) |
|
|
|
|
|
|
|
|
fs.GetOrHeadHandler(w, r) |
|
|
stats.FilerRequestHistogram.WithLabelValues("head").Observe(time.Since(start).Seconds()) |
|
|
stats.FilerRequestHistogram.WithLabelValues("head").Observe(time.Since(start).Seconds()) |
|
|
case "OPTIONS": |
|
|
case "OPTIONS": |
|
|
stats.FilerRequestCounter.WithLabelValues("options").Inc() |
|
|
stats.FilerRequestCounter.WithLabelValues("options").Inc() |
|
|