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

fix(metrics/collector): drop k8s labels #3141

Merged
merged 2 commits into from Jul 10, 2023

Conversation

swiatekm-sumo
Copy link
Contributor

@swiatekm-sumo swiatekm-sumo commented Jul 10, 2023

Prometheus receiver adds some attributes based on Prometheus' meta labels. This cannot be turned off explicitly or prevented by deleting the labels in relabel configs, because the labels are extracted from the context.

Drop these labels in a processor, as we don't need them, and their presence makes the pipeline more difficult to understand.

I've also added a test specifically for metadata of kube-state-metrics, which have specific requirements. For example, Prometheus incorrectly assigns Pod metadata to them, and the test checks whether we remove it.

Checklist

  • Changelog updated or skip changelog label added
  • Documentation updated
  • Template tests added for new features
  • Integration tests added or modified for major features

@swiatekm-sumo swiatekm-sumo force-pushed the fix/metrics/collector-default-labels branch from 2dd0087 to 2829b8a Compare July 10, 2023 09:33
@swiatekm-sumo swiatekm-sumo force-pushed the fix/metrics/collector-default-labels branch from 7288299 to 7232cb8 Compare July 10, 2023 15:25
@swiatekm-sumo swiatekm-sumo marked this pull request as ready for review July 10, 2023 15:43
@swiatekm-sumo swiatekm-sumo requested a review from a team as a code owner July 10, 2023 15:43
Copy link
Contributor

@sumo-drosiek sumo-drosiek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@swiatekm-sumo swiatekm-sumo merged commit 30cccd9 into main Jul 10, 2023
40 checks passed
@swiatekm-sumo swiatekm-sumo deleted the fix/metrics/collector-default-labels branch July 10, 2023 16:06
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.

None yet

2 participants