Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Sanitise the
url
tag of thekubernetes.rest.client.latency
metric of thekubelet
check.Motivation
The
url
tag of thekubernetes.rest.client.latency
metric is causing some high cardinality issue.In order to reduce the cardinality, we strip the
url
tag to keep only the path.The
url
tag contains all the possible values for the Kubernetes API server calls made by the kubelet.Ex.:
https://35.242.243.158/api/v1/namespaces/%7Bnamespace%7D/configmaps?fieldSelector=%7Bvalue%7D&limit=%7Bvalue%7D&resourceVersion=%7Bvalue%7D
The host of the url is the Kubernetes API server.
Whereas it is the same for all the kubelet inside a cluster, it will be different in two different clusters.
Dropping the host part of the url will ease the comparison of
kubernetes.rest.client.latency
between different clusters.Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached