Closed 4ydx closed 9 years ago
That's how other statsd clients work as well. What behavior did you expect?
This is indeed how statsd clients typically work. If you do not want sampling, you can specify a rate of 1, and no sampling will be done.
With gauges and sets you typically do not want sampling, but many clients still support it to reduce client traffic. In addition, I supported it because I wanted to have a consistent api. etsy/statsd#139 has some info about it. The authoritative statsd server implementation simply ignores the sample rate on these data types.
If you have any comments about which parts of the documentation were confusing, or suggestions to improve or clarify, then let me know.
Yeah I just realized that other libs do this as well. Total misunderstanding on my part.
The way you are handling sampling rates is not intuitive to me. You should probably mention in your documentation that you are randomly dropping requests that the client is making based on the rate being specified. Really this seems like something that you should be leaving to individuals who are using your library rather than baking it in.