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

Remove ordered_float dependency #1761

Closed
cijothomas opened this issue May 14, 2024 · 1 comment
Closed

Remove ordered_float dependency #1761

cijothomas opened this issue May 14, 2024 · 1 comment
Labels
A-metrics Area: issues related to metrics help wanted Good for taking. Extra help will be provided by maintainers/approvers

Comments

@cijothomas
Copy link
Member

The SDK currently has a dependency on ordered_float. It is used to provide Hash, PartialEq implementations, for F64 values. While the crate is very popular, it is still a 3rd party dependency, maintained under a personal account.
Proposing to remove the dependency, and make Hash/PartialEq implementation in the opentelemetry crate itself, where Value is defined.

The "correctness" part is not very important - i.e it is undefined if the following would get aggregated into a single metric point or not.

counter.Add(10, &[KeyValue::new("key", F64.Nan)]
counter.Add(10, &[KeyValue::new("key", F64.Nan)]

As a bonus, we can avoid the HashKeyValue wrapper around KeyValue used in Metrics, which solely exist today to provide hash/partialeq implementations.

@cijothomas cijothomas added help wanted Good for taking. Extra help will be provided by maintainers/approvers A-metrics Area: issues related to metrics labels May 14, 2024
@cijothomas cijothomas added this to the Metrics SDK Stable milestone May 14, 2024
@cijothomas
Copy link
Member Author

Closed via #1806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metrics Area: issues related to metrics help wanted Good for taking. Extra help will be provided by maintainers/approvers
Projects
None yet
Development

No branches or pull requests

1 participant