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

Add kube_namespace tag to object count metrics #11734

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

ahmed-mez
Copy link
Contributor

What does this PR do?

<object>.count metrics do not use the default kube_labels_mapper as opposed to the other metrics, it's why the kube_namespace tag was missing. This PR fixes this.

Motivation

Bug fix.

Additional Notes

The label mapper override is inspired by what we do in the ksm core check https://github.com/DataDog/datadog-agent/blob/main/pkg/collector/corechecks/cluster/ksm/kubernetes_state.go#L717-L729

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

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #11734 (4dad638) into master (129ddb7) will decrease coverage by 0.00%.
The diff coverage is 94.73%.

Flag Coverage Δ
kubernetes_state 89.35% <94.73%> (-0.44%) ⬇️

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

@ahmed-mez ahmed-mez merged commit ab554b9 into master Apr 4, 2022
@ahmed-mez ahmed-mez deleted the ahmed/fix-count-metrics branch April 4, 2022 08:24
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.

2 participants