Conversation
4fbd20f to
0d50248
Compare
0d50248 to
79309d7
Compare
wangzlei
approved these changes
Jan 14, 2026
ezhang6811
pushed a commit
to ezhang6811/aws-otel-python-instrumentation
that referenced
this pull request
Jan 15, 2026
Recently, a new field was added to the X-Ray GetSamplingRules API that was not accounted for in the AWS X-Ray Remote Sampler implementation done in ADOT Python. As a result, enabling this new field would cause a failure and cease the parsing of any other rules in a given API response. Example: Received 10 rules from the API, third of which has the SamplingRateBoost field. The SDK will successfully parse the first two, fail on the third, then stop there. As such, the SDK will only have 2/10 of the sampling rules and will not be able to effectively make sampling decisions based on the sampling rules set by the user. Any unmatched spans will use the _FallbackSampler. - Add usage of `kwargs` in X-Ray sampling API related objects, e.g. SamplingRule, SamplingTarget, etc. - Add unit tests proving additional fields do not cause errors. - Unit tests - Tested in depth as part of aws-observability#576, which this change was a part of but is now separated out to get it in more quickly By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Merged
ezhang6811
added a commit
that referenced
this pull request
Jan 15, 2026
*Issue #, if available:* *Description of changes:* Ports the following commits from main into the 0.14.x release branch for pending 0.14.2 release: * #570 * #571 * #572 * #573 * #574 * #575 * #577 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Syed Ahsan Ishtiaque <176968742+syed-ahsan-ishtiaque@users.noreply.github.com> Co-authored-by: Lei Wang <66336933+wangzlei@users.noreply.github.com> Co-authored-by: Jonathan Lee <107072447+jj22ee@users.noreply.github.com> Co-authored-by: Steve Liu <liustve@amazon.com> Co-authored-by: Mahad Janjua <134644284+majanjua-amzn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Recently, a new field was added to the X-Ray GetSamplingRules API that was not accounted for in the AWS X-Ray Remote Sampler implementation done in ADOT Python. As a result, enabling this new field would cause a failure and cease the parsing of any other rules in a given API response.
Example: Received 10 rules from the API, third of which has the SamplingRateBoost field. The SDK will successfully parse the first two, fail on the third, then stop there. As such, the SDK will only have 2/10 of the sampling rules and will not be able to effectively make sampling decisions based on the sampling rules set by the user. Any unmatched spans will use the _FallbackSampler.
Changes
kwargsin X-Ray sampling API related objects, e.g. SamplingRule, SamplingTarget, etc.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.