-
Notifications
You must be signed in to change notification settings - Fork 188
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
U64 and U128 Guage Types #470
Comments
I have the same problem, though in my case I actually did overflow an i64. A u64 gauge would be perfect for me. Or, failing that, if |
All the If your usecases do not fit in what the That said, maybe there is a way to accommodate the |
For our my case, |
But that's not something that this type of instrumentation can provide, nor a problem that we can solve in this library. |
So does this crate already convert i64 types info f64 internally? |
Yes: Lines 87 to 106 in 8b462b1
But, once again, |
Lame. Well, that's what I'll do now. I'll just use the f64 Gauge type. |
There are currently two types of Guage types supported by this library.
IntGauge
supports i64 values andgauge
supports f64 values. It would be great if there was aGuage
type that supported u64 values as well as u128 values.We currently cast our u64 value into an i64 type so we can use the
IntGuage
type. This approach can possibly throw an exception when the u64 value goes out of bounds and we would ideally like to avoid that.We considered using the simple
guage
type which supports f64 values but there seems to be a lot more performance overhead in using that according to the docs here.Regarding the need for a u128 type guage, we would like to store a timestamp in nanoseconds which requires this, but it would be better to prioritize the u64 type first.
The text was updated successfully, but these errors were encountered: