Skip to content

Conversation

@mcfunley
Copy link

Sampling is intended to be implemented by statsd clients. If the sampleRate provided is 0.5, for example, that implies that the client is only sending 50% of the packets and that the server should scale up the number of counts received by a factor of two. See for example the PHP client.

The existing implementation of the java client sends along a sample rate, but it doesn't actually sample. This PR fixes that issue.

@mcfunley
Copy link
Author

The issue with the tests is that ThreadLocalRandom is new in Java 7, and this is targeting Java 6 apparently. The documentation warns about contention with Math.Random, which is why I switched it. I think the best thing to do is upgrade to Java 7, but lmk if you'd rather go the other way with this and I'll fix it.

@nemoo
Copy link

nemoo commented Jun 22, 2015

Upgrade to Java 7 sounds good. Java 6 is really kinda dated nowadays.

@coderlol
Copy link

coderlol commented Oct 2, 2015

Is this PR in a release?

@GuiSim
Copy link

GuiSim commented Jan 11, 2016

Is this repo dead?

@waynr
Copy link

waynr commented Sep 21, 2016

https://github.com/DataDog/java-dogstatsd-client appears to be a more actively maintained version of this project, I recommend submitting your patch there if you have not already done so.

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.

5 participants