Skip to content

Conversation

@jalil-salame
Copy link
Contributor

Implement EncodeGaugeValue for usize and isize and EncodeCounterValue for usize. This is very straight forward and the argument is the same as the one for EncodeGaugeValue for u64; if you don't do this the user code will get littered with as i64/as u64.

Since these conversions are infallible for 32-bit platforms, and have the same issues as the current u64 impl for 64-bit platforms, I don't think there is any problem with adding them.

Implement `EncodeGaugeValue` for `usize` and `isize`, and
`EncodeCounterValue` for `usize`. This is very straight forward and the
argument is the same as the one for `EncodeGaugeValue for u64`; if you
don't do this the user code will get littered with `as i64`/`as u64`.

Since these conversions are infallible for `32-bit` platforms, and have
the same issues as the current `u64` impl for `64-bit` platforms, I
don't think there is any problem with adding them.

Signed-off-by: Jalil David Salamé Messina <[email protected]>
@jalil-salame jalil-salame force-pushed the add-usize-isize-encode-impls branch from cdd1bd2 to ca8decb Compare September 2, 2025 13:19
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.

1 participant