forked from mirror/client_golang
commit
140d476395
|
@ -45,7 +45,7 @@ var (
|
||||||
func handler(w http.ResponseWriter, r *http.Request) {
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
status := http.StatusOK
|
status := http.StatusOK
|
||||||
// The ObserverFunc gets called by the deferred ObserveDuration and
|
// The ObserverFunc gets called by the deferred ObserveDuration and
|
||||||
// decides wich Histogram's Observe method is called.
|
// decides which Histogram's Observe method is called.
|
||||||
timer := prometheus.NewTimer(prometheus.ObserverFunc(func(v float64) {
|
timer := prometheus.NewTimer(prometheus.ObserverFunc(func(v float64) {
|
||||||
switch {
|
switch {
|
||||||
case status >= 500: // Server error.
|
case status >= 500: // Server error.
|
||||||
|
|
Loading…
Reference in New Issue