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

f64 support for distribution metric type #131

Closed
mbellani opened this issue Mar 23, 2021 · 3 comments · Fixed by #137
Closed

f64 support for distribution metric type #131

mbellani opened this issue Mar 23, 2021 · 3 comments · Fixed by #137

Comments

@mbellani
Copy link

Thanks for adding distribution metric type support to cadence. It looks like the value types supported for distribution are only u64. There are cases however where distribution can be reported in fractions and it would be really great to either add that interface or change the type from u64 to f64. DataDog's datagram format does support both float and an integer, we currently use it this way in a custom metric type that we created. Also happy to open a PR if you like.

Thanks for all your work this library.

@56quarters
Copy link
Owner

A PR that mirrors the way f64 was added for gauges would be great if you can, thanks!

@56quarters
Copy link
Owner

Actually @mbellani, I've got some changes that I've been meaning to put up for a PR that will make the value for each metric call generic and remove the need for suffixed methods like _duration and _f64. Do you have an immediate need for an f64 distribution type? If not, I'd rather not have you waste the work for something that's going to be deprecated imminently.

@mbellani
Copy link
Author

@56quarters that sounds good to me, I'm not in a hurry, we currently have an implementation of Distribution metric that works pretty well and happy to switch whenever a more generic type support is added. I think generic type support would be great 👍🏽

56quarters added a commit that referenced this issue May 9, 2021
Add support for emiting f64 types for histograms and distributions
and clean up some the StatsdClient tests.

Fixes #131
56quarters added a commit that referenced this issue May 9, 2021
Add support for emiting f64 types for histograms and distributions
and clean up some the StatsdClient tests.

Fixes #131
56quarters added a commit that referenced this issue May 9, 2021
Add support for emiting f64 types for histograms and distributions
and clean up some the StatsdClient tests.

Fixes #131

Signed-off-by: Nick Pillitteri <nick@56quarters.xyz>
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 a pull request may close this issue.

2 participants