-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add dynamic sampler support to rules based samplers #317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice and is a great start.
It's a shame we can't use sample.Sampler
as the type in RulesBasedSamplerRule
because it introduces a circular dependency. Maybe that's something we can look at resolving.
I'd like to see the sampler creation moved to Start
and a couple of other suggestions.
I added I also added support for the TotalThroughput sampler, based on a comment thread in Slack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @puckpuck 👍🏻
…i-arch-docker * 'main' of github.com:honeycombio/refinery: Add dynamic sampler support to rules based samplers (#317)
The RulesBased sample is exclusive to the other samplers. This PR allows you to use Dynamic and EMADynamic samplers to determine the sample rate of a RulesBased sampler rule. Co-authored-by: Mike Goldsmth <goldsmith.mike@gmail.com>
Which problem is this PR solving?
The RulesBased sample is exclusive to the other samplers. This PR allows you to use Dynamic and EMADynamic samplers to determine the sample rate of a RulesBased sampler rule.
Short description of the changes
This adds a new
Downstream
option to a rule configuration. This option can be used to contain either aDynamicSampler
orEMADynamicSampler
option that is a complete configuration of their respective samplers. When defined the downstream sampler will be used to determine the sample rate when all rule conditions are matched.A popular use case is to use RulesBased sampling to keep all error and long duration traces while using a dynamic sampler for all other data, based on key fields.
Closes #283
notes:
Downstream
is the right one here. Naming things is hard.