Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize the url tag #11989

Merged
merged 1 commit into from
May 11, 2022
Merged

Sanitize the url tag #11989

merged 1 commit into from
May 11, 2022

Conversation

L3n41c
Copy link
Member

@L3n41c L3n41c commented May 11, 2022

What does this PR do?

Sanitise the url tag of the kubernetes.rest.client.latency metric of the kubelet check.

Motivation

The url tag of the kubernetes.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)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@L3n41c L3n41c force-pushed the lenaic/sanitize_url branch from 4f51076 to 941ef82 Compare May 11, 2022 12:46
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #11989 (941ef82) into master (792e0f4) will increase coverage by 0.00%.
The diff coverage is 87.50%.

Flag Coverage Δ
kubelet 90.73% <87.50%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@L3n41c L3n41c merged commit 9dfa1e7 into master May 11, 2022
@L3n41c L3n41c deleted the lenaic/sanitize_url branch May 11, 2022 14:44
@yzhan289 yzhan289 changed the title [kubelet] Sanitize the url tag Sanitize the url tag May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants