Skip to content

Support float values for Counters #722

@pawilon

Description

@pawilon

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions