-
Notifications
You must be signed in to change notification settings - Fork 208
feat: AWS X-Ray Remote Sampler Part 2 - Add Rules Caching and Rules Matching Logic #1498
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
Conversation
@lukeina2z Need your help reviewing. Currently everything is implemented except for Updating Sampling Targets and the Rate Limiting (Reservoir) Sampler. |
PR is ready for merge from our end. |
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.
Overall, this looks great! I have a few small questions/comments.
Thanks for your patience!
sampler/xray/lib/opentelemetry/sampler/xray/sampling_rule_applier.rb
Outdated
Show resolved
Hide resolved
sampler/xray/lib/opentelemetry/sampler/xray/aws_xray_remote_sampler.rb
Outdated
Show resolved
Hide resolved
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.
Thanks for the updates and for your patience @jj22ee. Looking forward to the next PR!
Description
This is the 2nd PR to address #1434 in order for OTel Ruby to support X-Ray Remote Sampling. One more PR to fully implement this feature will follow this one.
Changes:
RuleCache
SamplingRuleApplier
s, ordered by rule priority then rule name. Each Rule Applier corresponds to the Sampling Rule from GetSamplingRules. Each call to GetSamplingRules will only update theRule
s that have changed properties, to preserve the state of unchanged rules. This means when Reservoir and Statistics are implemented (later) in theRule
s, they will persist for unchanged rules.SamplingRuleApplier
to perform Fixed Rate Sampling, and to include a method to apply matching logic against a set of {ResourceAttributes,SpanAttributes} by using the wild card and attribute matching from UtilsFallbackSampler
X-Ray Remote Sampler
to depend on the SamplingRuleApplier fromRuleCache
and the FallBack Sampler to performshould_sample?
Testing