published by bot

(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is d8c925319a23f6bbf865baa53ae23f48f60dd73b
This commit is contained in:
Kubernetes Publisher
2016-12-11 15:19:40 +00:00
parent 6841809cf1
commit 243d8a9cb6
165 changed files with 28504 additions and 27192 deletions

View File

@@ -694,9 +694,10 @@ func updateURLMetrics(req *Request, resp *http.Response, err error) {
url = req.baseURL.Host
}
// If we have an error (i.e. apiserver down) we report that as a metric label.
// Errors can be arbitrary strings. Unbound label cardinality is not suitable for a metric
// system so we just report them as `<error>`.
if err != nil {
metrics.RequestResult.Increment(err.Error(), req.verb, url)
metrics.RequestResult.Increment("<error>", req.verb, url)
} else {
//Metrics for failure codes
metrics.RequestResult.Increment(strconv.Itoa(resp.StatusCode), req.verb, url)