Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[internal] Add rate limit effective sample rate #1046

Merged

Conversation

brettlangdon
Copy link
Member

@brettlangdon brettlangdon commented Sep 5, 2019

Note this PR is merging into brettlangdon/datadog.sampler not master

This PR adds in RateLimiter.effective_rate to return the effective sample rate at that time based on the total number of traces seen vs the number of sampled traces in any given 1s rolling window.

TODO:

  • Add tests for RateLimiter.effective_rate
  • Properly set _dd.limit_psr tag on spans

@brettlangdon brettlangdon requested a review from a team as a code owner September 5, 2019 02:42
@brettlangdon brettlangdon merged commit e12612c into brettlangdon/datadog.sampler Sep 5, 2019
@brettlangdon brettlangdon deleted the brettlangdon/limiter.rate branch September 5, 2019 14:05
@brettlangdon
Copy link
Member Author

Merged this code into #1020

@majorgreys majorgreys added this to the 0.30.0 milestone Oct 7, 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.

None yet

3 participants