mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/httpserver: sync the code with master branch
This commit is contained in:
parent
a045c62532
commit
05ec8afb3a
1 changed files with 7 additions and 7 deletions
|
@ -142,17 +142,17 @@ func handlerWrapper(w http.ResponseWriter, r *http.Request, rh RequestHandler) {
|
|||
}
|
||||
w.WriteHeader(status)
|
||||
return
|
||||
case "/metrics":
|
||||
startTime := time.Now()
|
||||
metricsRequests.Inc()
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
writePrometheusMetrics(w)
|
||||
metricsHandlerDuration.UpdateDuration(startTime)
|
||||
return
|
||||
case "/favicon.ico":
|
||||
faviconRequests.Inc()
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
return
|
||||
case "/metrics":
|
||||
metricsRequests.Inc()
|
||||
startTime := time.Now()
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
writePrometheusMetrics(w)
|
||||
metricsHandlerDuration.UpdateDuration(startTime)
|
||||
return
|
||||
default:
|
||||
if strings.HasPrefix(r.URL.Path, "/debug/pprof/") {
|
||||
pprofRequests.Inc()
|
||||
|
|
Loading…
Reference in a new issue