From 66c95c765fd44d8f87b5fa37f168a1b9e2c11ad9 Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Tue, 20 Jun 2017 11:56:21 -0700 Subject: [PATCH] Set ContinueOnError for prometheus http handler. --- http/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/handlers.go b/http/handlers.go index d5ae628d..c1a1f58f 100644 --- a/http/handlers.go +++ b/http/handlers.go @@ -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) {