Skip to content

Default sample rate#110

Merged
albertvaka merged 2 commits intoDataDog:masterfrom
claytono:default-sample-rate
Jun 14, 2019
Merged

Default sample rate#110
albertvaka merged 2 commits intoDataDog:masterfrom
claytono:default-sample-rate

Conversation

@claytono
Copy link
Copy Markdown

This adds a flag to the constructor to allow setting a default sample rate, if the caller doesn't set one on each call. This also fixes a minor problem in the sampling test cases and a bug with the sampling edge case that it was hiding.

Clayton O'Neill added 2 commits April 18, 2019 12:48
The test case for the sampling rate equalling the random value was not
testing the right scenario, which hid the fact that it was actually
failing.
Allow providing a sample rate when creating the statsd object.  This is
only used if the caller doesn't provide one when updating a metric.
@albertvaka
Copy link
Copy Markdown
Contributor

Thanks for your contribution @claytono 😃And sorry this took so long to review 😥

Looks good to me, merging!

@albertvaka albertvaka merged commit 604ddcc into DataDog:master Jun 14, 2019
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.

2 participants