-
Notifications
You must be signed in to change notification settings - Fork 292
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
[Sampler.AWS] Wrapped root sampler with ParentBasedSampler #2188
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.
LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2188 +/- ##
===========================================
+ Coverage 73.91% 88.25% +14.34%
===========================================
Files 267 20 -247
Lines 9615 562 -9053
===========================================
- Hits 7107 496 -6611
+ Misses 2508 66 -2442
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@ppittle, do you want to merge this? @AsakerMohd, I think that having CHANGELOG entry is good idea here. |
Yeah let me do that. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@AsakerMohd - LGTM - thanks for the changes! |
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.
Approving ane mergin based on @ppittle comment.
Fixes #
Design discussion issue #
Changes
The current implementation of the X-Ray sampler has 2 levels: The X-Ray Sampler itself which is made up two different samplers for X-Ray purposes. Those two different samplers are wrapped by parentBasedSampler so that the children inherit the parent sampling decision. However, on the CloudWatch console, we are adding the children sampling decision into the stats section. This means: if we have 1 parent and 9 children, the CW console will show that 10 spans are sampled which isn't correct. It should show only 1 span being sampled. This PR moves the ParentBasedSampler wrapper to be on the root level of the X-Ray sampler. This means that the builder doesn't return AWSXrayRemoteSampler anymore but returns ParentBasedSampler(new AWSXrayRemoteSampler). This keeps the same parentBasedSampling logic but is instead on the root level thus skipping the stat aggregation for the children.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes