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

Implement Atomic<u64> for AtomicU64 for gauges #226

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Sep 21, 2024

Between forcing end users to do endless as i64 for things that are clearly u64 and having one error case for rarely used protobuf when a gauge is set to u64::MAX, the latter seems like the right choice.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this some more, I think you are right, i.e. I think this is the right tradeoff.

Thank you for being persistent. Thanks for the thorough pull request.

Two minor comments, but otherwise this is good to go.

Also please add a changelog entry.

src/encoding.rs Show resolved Hide resolved
src/encoding/protobuf.rs Show resolved Hide resolved
Between forcing end users to do endless `as i64` for things that are
clearly `u64` and having one error case for rarely used protobuf when
a gauge is set to `u64::MAX`, the latter seems like the right choice.

Signed-off-by: Ivan Babrou <[email protected]>
@bobrik
Copy link
Contributor Author

bobrik commented Oct 11, 2024

Updated. Please feel free adjust any text as you see fit.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. @bobrik let me know if you need a release.

@mxinden mxinden merged commit 12923ca into prometheus:master Oct 16, 2024
10 checks passed
@bobrik bobrik deleted the ivan/atomic-u64 branch October 20, 2024 02:46
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.

2 participants