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

feat: AWS X-Ray Remote Sampler Part 1 - Initial Classes and Rules Poller Implementation #1453

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jj22ee
Copy link

@jj22ee jj22ee commented Mar 19, 2025

Description

This is an initial PR to address #1434 in order for OTel Ruby to support X-Ray Remote Sampling. A series of PRs to fully implement this feature will follow this one.

Changes:

  • Add new package directory sampler/xray/lib/opentelemetry-sampler-xray.rb
  • Updated the OTel Contrib workflow to also run tests for this xray sampler gem
  • Code changes:
    • Add Sampling Client class to communicate with X-Ray Service for Sampling Rules/Targets
    • Add X-Ray Sampling Rules/Statistics related classes to help represent the Sampling data from X-Ray
    • Added the AWSXRayRemoteSampler skeleton class
      • Ensure AWSXRayRemoteSampler is a ParentBased Sampler, with internal logic inside InternalAWSXRayRemoteSampler
      • Run poller upon instantiation to regularly obtain X-Ray Sampling Rules from X-Ray

Testing

  • Unit Tests
  • This PR is not a full implementation of the sampler, so it cannot be tested for correct x-ray sampling functionality.
    Right now, it currently always return a Parent Based decision or a DROP decision as a placeholder.
  • A couple more PRs will follow-up to complete the implementation, which should look like this Sampler code from my fork. At that point in the future, a full E2E integration test will be run.

@jj22ee jj22ee changed the title AWS X-Ray Remote Sampler Part 1 - Initial Classes and Rules Poller Implementation feat: AWS X-Ray Remote Sampler Part 1 - Initial Classes and Rules Poller Implementation Mar 19, 2025
@jj22ee
Copy link
Author

jj22ee commented Mar 25, 2025

@kaylareopelle I've made the initial PR for X-Ray Sampler, will try to get someone from AWS who is familiar with X-Ray Sampling to help with the review.
Just not sure who can help review from OTel Ruby side since this is a new component.

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.

1 participant