keep apiserver_request_latencies_summary

Kubernetes-commit: 2c2e1c5443a637353a3ab36cb8e51a9a60691042
This commit is contained in:
danielqsj 2019-05-28 17:31:08 +08:00 committed by Kubernetes Publisher
parent 669e87efbe
commit ade6c3cc65
1 changed files with 1 additions and 0 deletions

View File

@ -282,6 +282,7 @@ func MonitorRequest(req *http.Request, verb, group, version, resource, subresour
reportedVerb := cleanVerb(verb, req)
dryRun := cleanDryRun(req.URL)
client := cleanUserAgent(utilnet.GetHTTPClient(req))
elapsedMicroseconds := float64(elapsed / time.Microsecond)
elapsedSeconds := elapsed.Seconds()
requestCounter.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component, client, contentType, codeToString(httpCode)).Inc()
deprecatedRequestCounter.WithLabelValues(reportedVerb, group, version, resource, subresource, scope, component, client, contentType, codeToString(httpCode)).Inc()