From 77e51ef6d6c11b5a6d19c9bca34f537a6b4aa4f2 Mon Sep 17 00:00:00 2001 From: "dongsheng.qi" Date: Wed, 1 Nov 2023 14:11:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=97=A0=E6=95=88=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=E4=B8=8A=E6=8A=A5prometheus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apiserver/httpserver/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiserver/httpserver/server.go b/apiserver/httpserver/server.go index 277489a19..a49aa1dbf 100644 --- a/apiserver/httpserver/server.go +++ b/apiserver/httpserver/server.go @@ -555,7 +555,7 @@ func (h *HTTPServer) postProcess(req *restful.Request, rsp *restful.Response) { recordApiCall := true if !ok { code = uint32(rsp.StatusCode()) - recordApiCall = code != http.StatusNotFound + recordApiCall = code != http.StatusNotFound && code != http.StatusMethodNotAllowed } diff := now.Sub(startTime)