Merge pull request #87682 from logicalhan/automated-cherry-pick-of-#87673-upstream-release-1.15
Automated cherry pick of #87673: blank out value for unbounded client label Kubernetes-commit: e91de4083dbd8794dda90d0c3dcbd63c7d63c52c
This commit is contained in:
commit
d961f93e70
|
@ -29,7 +29,6 @@ import (
|
|||
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/validation"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
utilnet "k8s.io/apimachinery/pkg/util/net"
|
||||
utilsets "k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apiserver/pkg/endpoints/request"
|
||||
"k8s.io/apiserver/pkg/features"
|
||||
|
@ -248,7 +247,8 @@ func RecordLongRunning(req *http.Request, requestInfo *request.RequestInfo, comp
|
|||
func MonitorRequest(req *http.Request, verb, group, version, resource, subresource, scope, component, contentType string, httpCode, respSize int, elapsed time.Duration) {
|
||||
reportedVerb := cleanVerb(verb, req)
|
||||
dryRun := cleanDryRun(req.URL)
|
||||
client := cleanUserAgent(utilnet.GetHTTPClient(req))
|
||||
// blank out client string here, in order to avoid cardinality issues
|
||||
client := ""
|
||||
elapsedMicroseconds := float64(elapsed / time.Microsecond)
|
||||
elapsedSeconds := elapsed.Seconds()
|
||||
requestCounter.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component, client, contentType, codeToString(httpCode)).Inc()
|
||||
|
|
Loading…
Reference in New Issue