opentelemetry-js-contrib
opentelemetry-js-contrib copied to clipboard
feat(opentelemetry-sampler-aws-xray): Update Rules Poller Implementation
Which problem is this PR solving?
- https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2736
- This PR will be followed up by 2 more PRs to complete the X-Ray Sampler Implementation
Short description of the changes
This PR is an update to https://github.com/open-telemetry/opentelemetry-js-contrib/pull/1443
- Updated the AWSXRayRemoteSampler skeleton class
- Ensure
AwsXRayRemoteSampleris a ParentBased Sampler, with internal logic inside_AWSXRayRemoteSampler - Refactor for obtaining X-Ray Sampling Rules and polling the Sampling Rules
- Ensure
- Added class for
SamplingRuleand Skeleton class forSamplingRuleApplier - Add
Statisticsclass for sampling rules statistics (not used yet) - Removed
axiosas a dependency, rely onhttpmodule for polling rules - Extracted all external http calls into
aws-xray-sampling-client.ts
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.67%. Comparing base (
27f5c66) to head (701b64b). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2750 +/- ##
=======================================
Coverage 89.67% 89.67%
=======================================
Files 184 184
Lines 8946 8946
Branches 1834 1834
=======================================
Hits 8022 8022
Misses 924 924
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Hi @trentm, in this PR I am continuing the X-Ray Sampler Implementation, which I plan to finish in 2 followup PRs.
I've moved the Sampler out from incubator/opentelemetry-sampler-aws-xray and into packages/opentelemetry-sampler-aws-xray in this PR. Would you prefer that I keep it in incubator for now, and move it into packages only when the implementation is complete?
Since I added it to packages, I also had to update release-please-config.json to make the PR checks to pass:
"packages/opentelemetry-sampler-aws-xray": {
"skip-github-release": true
},
Note that this PR is moving the Sampler out from incubator/opentelemetry-sampler-aws-xray and into packages/opentelemetry-sampler-aws-xray, and added this package to release-please-config.json to skip the release of this component for now. Otherwise I can keep it in incubator/ until the implementation is complete if that is preferred.
@pichlermarc Looking for approval. Also wondering if you are fine with moving this sampler out of /incubator?
@pichlermarc Looking for approval. Also wondering if you are fine with moving this sampler out of /incubator?
@jj22ee I'd rather have it remain in incubating for now since the dependencies still need to be updated to reference SDK 2.0 (node engine field also needs to be adapted since we don't support Node.js 14 anymore in the latest releases of the contrib repo and we don't test for it anymroe).
@pichlermarc Moved the Sampler back into incubator, also updated to SDK 2.0.
I assume we can ignore the TAV checks here?
@pichlermarc Moved the Sampler back into incubator, also updated to SDK 2.0.
@jj22ee thanks!
There also seem to be some changes to the top-level package-lock.json from a previous commit that included the sampler package in the workspace - would you mind undoing them?
I assume we can ignore the TAV checks here?
Yes, we can safely ignore them here.
oops, fixed package-lock.json!
Looks like the TAV checks are also failing
These TAV failures can be ignored. It's caused due to the incubator/ directory not being part of the root package.json's workspaces list. Any change to this incubator subproject will result in TAV failures, which we can ignore (until it is moved to packages/ directory).