-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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/podman] Fix precision for cpu metrics #35633
base: main
Are you sure you want to change the base?
Conversation
21ebab3
to
0af750b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Any updates? |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@open-telemetry/collector-contrib-approvers any feedback on this PR? Thanks! |
Needs the latest from main |
Description
Podman provides cpu time metrics with nanosecond precision, but the current implementation truncates this to an integer with second precision, which loses a lot of information, so I made it a floating point number to preserve precision.
Testing
Use
assert.InDelta
for tests with floating point numbers.