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

Add WithResource option for the remote sampler constructor #3658

Closed
wants to merge 2 commits into from

Conversation

jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Mar 28, 2023

To be consistent across the OTel SDK XRay samplers, the service name and cloud platform fields of the Remote Sampler should be able to be retrieved from a Resource. Currently, These fields are only configurable through the Remote Sampler constructor.

Context of Issue:
The resource of the TracerProvider is not available to the sampler (GH Issue), and it does not look like it will be anytime soon. As an alternative, the resource should be able to be passed into the sampler instantiation.

@jj22ee jj22ee requested a review from a team March 28, 2023 16:44
@jj22ee jj22ee requested a review from Aneurysm9 as a code owner March 28, 2023 16:44
@dmathieu
Copy link
Member

Could you add tests?

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #3658 (9cbf51f) into main (e4444d3) will decrease coverage by 0.2%.
The diff coverage is 5.2%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3658     +/-   ##
=======================================
- Coverage   69.9%   69.8%   -0.2%     
=======================================
  Files        147     147             
  Lines       6960    6977     +17     
=======================================
+ Hits        4871    4875      +4     
- Misses      1963    1977     +14     
+ Partials     126     125      -1     
Impacted Files Coverage Δ
samplers/aws/xray/remote_sampler.go 1.9% <0.0%> (-0.3%) ⬇️
samplers/aws/xray/remote_sampler_config.go 80.4% <16.6%> (-11.0%) ⬇️

... and 1 file with indirect coverage changes

@jj22ee jj22ee closed this Mar 30, 2023
@jj22ee
Copy link
Contributor Author

jj22ee commented Mar 31, 2023

Closed as I will create a new PR that may be potentially different.

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.

2 participants