-
Notifications
You must be signed in to change notification settings - Fork 84
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 for usize #193
Comments
Note that In other words, say that you provide a Does that make sense? |
If it is encoded in text format, just write it out as text. There are no such restrictions in text format, any integer can be encoded there even if it does not fit 128 bits. If it is not supported by the receiver, it is the receiver problem. Currently in the application I have to do this: metrics.heartbeat_token_count.set(tokens.len() as i64); Metrics are then exported as text. This |
I opened #226 to add A similar thing can be done for |
I want to store
usize
in a gauge metric without conveting it to u64, butAtomic
trait is not implemented forusize
:https://docs.rs/prometheus-client/0.22.2/prometheus_client/metrics/gauge/trait.Atomic.html
Because of this
Gauge::<usize, AtomicUsize>::default()
. Is there any reason for not supporting it? Would it require too high MSRV?The text was updated successfully, but these errors were encountered: