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

[pkg/pmetrictest] option to ignore float precision discrepancies when using CompareMetrics #35085

Conversation

greatestusername
Copy link
Contributor

Description:
Addresses issue: #35060
Adds option to CompareMetrics testing function that rounds floats to an arbitrary number of decimals. This is needed to avoid issues with float precision during testing.

Link to tracking Issue:
#35060

Testing:
Test and test data added for this CompareMetrics option

Documentation:
No new docs. Let me know if I should be adding something somewhere!

@greatestusername greatestusername marked this pull request as ready for review September 9, 2024 22:31
@greatestusername greatestusername requested a review from a team September 9, 2024 22:31
@greatestusername
Copy link
Contributor Author

greatestusername commented Sep 9, 2024

I dont think this one needs a changelog entry but let me know if it does and I'll get one added.

And should I be addressing this? Or is this failing for other reasons? prometheus-compliance-tests (pull_request)

@djaglowski djaglowski added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 11, 2024
@djaglowski djaglowski merged commit 290063a into open-telemetry:main Sep 11, 2024
161 of 163 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 11, 2024
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
… using `CompareMetrics` (open-telemetry#35085)

**Description:** <Describe what has changed.>
Addresses issue:
open-telemetry#35060
Adds option to `CompareMetrics` testing function that rounds floats to
an arbitrary number of decimals. This is needed to avoid issues with
float precision during testing.

**Link to tracking Issue:** <Issue number if applicable>

open-telemetry#35060

**Testing:** <Describe what testing was performed and which tests were
added.>
Test and test data added for this CompareMetrics option

**Documentation:** 
No new docs. Let me know if I should be adding something somewhere!

Co-authored-by: Antoine Toulme <atoulme@splunk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/pdatatest Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants