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

StatsD reporting double support #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkonstan-ovo
Copy link

Currently the StatsD reporting service converts metric values from double to long when calling the StatsD client.

This makes it unsuitable for the availability metrics because all digits after the decimal point are lost and therefore the only possible values are 1 (if value is 1) or 0 (if value is <1).

The next minor release of the StatsD client adds support for double value for gauges, without introducing any other changes:

https://github.com/tim-group/java-statsd-client/releases/tag/v3.0.2

This PR switches the StatsD client to this version and removes the conversion from double to long when calling the StatsD client, which fixes this issue and closes #365

No tests were included for the StatsD service, however since the StatsD client ultimately converts the value supplied (wether long or double) to string to report to the StatsD server, this change should have no effect on any of the other metrics that are integers.

@chrisbeard
Copy link

I've been running the same patch for some time now and can confirm this patch is both sound and essential to get accurate metrics from StatsD. It would be great for this to be merged upstream here.

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.

StatsD reporting of availability metrics is broken
2 participants