Skip to content

Commit

Permalink
fix:无效请求不需要上报prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng.qi committed Nov 1, 2023
1 parent 0aebad7 commit 77e51ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apiserver/httpserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 77e51ef

Please sign in to comment.