Merge pull request #1679 from Random-Liu/fix-metrics

Set ContinueOnError for prometheus http handler.
This commit is contained in:
Dawn Chen 2017-06-20 12:09:30 -07:00 committed by GitHub
commit f3d900b148

View File

@ -100,7 +100,7 @@ func RegisterPrometheusHandler(mux httpmux.Mux, containerManager manager.Manager
prometheus.NewGoCollector(),
prometheus.NewProcessCollector(os.Getpid(), ""),
)
mux.Handle(prometheusEndpoint, promhttp.HandlerFor(r, promhttp.HandlerOpts{}))
mux.Handle(prometheusEndpoint, promhttp.HandlerFor(r, promhttp.HandlerOpts{ErrorHandling: promhttp.ContinueOnError}))
}
func staticHandlerNoAuth(w http.ResponseWriter, r *http.Request) {