-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metrics): Use a FiniteF64 type in metrics (#2958)
Introduces a strictly typed `FiniteF64` type to prevent storing non-finite floats in metrics. This type requires a runtime check to be constructed. All existing usage of this type has been updated: - Metric extraction skips values that cannot be converted - Counters and gauges use saturating addition (clamped at MAX / MIN) - Tests use integers as mocks, which support infallible conversion - The `relay_metrics::dist!` macro now takes values that implement `Into<FiniteF64>`
- Loading branch information
Showing
16 changed files
with
603 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.