StatsD reporting double support#367
Open
kkonstan-ovo wants to merge 1 commit intolinkedin:masterfrom
Open
Conversation
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.