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

Support float values for Counters #722

Open
pawilon opened this issue Aug 7, 2024 · 0 comments
Open

Support float values for Counters #722

pawilon opened this issue Aug 7, 2024 · 0 comments

Comments

@pawilon
Copy link

pawilon commented Aug 7, 2024

I'm struggling to find an official statsd spec, but my experience suggests some statsd libraries accept floats as Counter values. This is the case for statsite. It works without issues with Graphite backend.

I discovered that gostatsd will instead round float counters to integers, breaking aggregation for apps that assume this will just work.

Using float counters is useful for counting something like a dollar cost of a specific API call. We could potentially use a Timer instead, but:

  • the naming is confusing
  • all the percentiles calculations aren't very useful for this use case

What do maintainers think about adding float Counters? Does it break anything, or is it mostly transparent to the users? Are there any other options?

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

No branches or pull requests

1 participant