Skip to content

implements sampling#33

Open
mcfunley wants to merge 3 commits into
tim-group:masterfrom
mcfunley:master
Open

implements sampling#33
mcfunley wants to merge 3 commits into
tim-group:masterfrom
mcfunley:master

Conversation

@mcfunley

Copy link
Copy Markdown

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
Copy Markdown
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

nemoo commented Jun 22, 2015

Copy link
Copy Markdown

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

@coderlol

coderlol commented Oct 2, 2015

Copy link
Copy Markdown

Is this PR in a release?

@GuiSim

GuiSim commented Jan 11, 2016

Copy link
Copy Markdown

Is this repo dead?

@waynr

waynr commented Sep 21, 2016

Copy link
Copy Markdown

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