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

[receiver/k8sclusterreceiver] Fix k8s node and container cpu metrics not being reported properly #8245

Merged
merged 6 commits into from
Mar 11, 2022

Conversation

jvoravong
Copy link
Contributor

@jvoravong jvoravong commented Mar 1, 2022

Description:
A bug has been reported where the k8sclusterreceiver has been reporting k8s node and container metrics improperly. The metrics k8s.container.cpu_request, k8s.container.cpu_limit, and k8s.node.allocatable_cpu should be reported as double values according to opentelemetry cpu metric specifications .
Fixing these type of bugs is likely a breaking change to some users, so the code fixes have been added behind a feature gate that is disabled by default. In the future, we will enable this feature gate by default and eventually remove the feature gate entirely.

Link to tracking Issue:
#8115

Testing:
Unit tests have been added. Manually testing in a Kubernetes cluster was successful.

Documentation:
A configuration entry was add to the k8sclusterreceiver README.md.
An entry was added to the CHANGELOG.md. For this PR since the feature gate is disabled by default, so we don't have to include a "Breaking changes" entry. In a future PR when the feature gate is enable by default, we will include a "Breaking changes" entry in the CHANGELOG.md.
Logging was added to notify users about the new feature gate and how the k8sclusterreceiver is being transitioned.

Notes:
I recommend looking at the first commit in this PR to see the main changes. The later commits are for adding unit tests that required refactoring some test util methods.

CHANGELOG.md Outdated Show resolved Hide resolved
@jvoravong
Copy link
Contributor Author

Rebased this feature branch and pulled the latest changes from main, all my changes for PR responses ended up getting merged into the first commit during the rebase.

@jvoravong jvoravong requested a review from dmitryax March 8, 2022 17:41
@jvoravong jvoravong requested a review from dmitryax March 10, 2022 21:35
@jvoravong jvoravong requested a review from dmitryax March 10, 2022 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants