From 2b04e09fa7830a2d24d863e448ebbdc51d537fbe Mon Sep 17 00:00:00 2001 From: "Y.Horie" Date: Wed, 26 Apr 2023 00:59:26 +0900 Subject: [PATCH] reverseproxy: Fix reinitialize upstream healthy metrics (#5498) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dávid Szabó --- modules/caddyhttp/reverseproxy/metrics.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/caddyhttp/reverseproxy/metrics.go b/modules/caddyhttp/reverseproxy/metrics.go index 4272bc4e..d3c8ee03 100644 --- a/modules/caddyhttp/reverseproxy/metrics.go +++ b/modules/caddyhttp/reverseproxy/metrics.go @@ -39,6 +39,8 @@ func newMetricsUpstreamsHealthyUpdater(handler *Handler) *metricsUpstreamsHealth initReverseProxyMetrics(handler) }) + reverseProxyMetrics.upstreamsHealthy.Reset() + return &metricsUpstreamsHealthyUpdater{handler} }