AWS X-Ray Remote Sampler Part 2 - Add Rules Caching, Rules Matching Logic, Rate Limiter, and Sampling Targets Poller#3761
AWS X-Ray Remote Sampler Part 2 - Add Rules Caching, Rules Matching Logic, Rate Limiter, and Sampling Targets Poller#3761jj22ee wants to merge 10 commits intoopen-telemetry:mainfrom
Conversation
xrmx
left a comment
There was a problem hiding this comment.
Could you please add the following and take care of any eventual output of tox -e typecheck?
diff --git a/pyproject.toml b/pyproject.toml
index 30ada5bb2..45b8ea632 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -206,6 +206,7 @@ include = [
"instrumentation-genai/opentelemetry-instrumentation-weaviate",
"util/opentelemetry-util-genai",
"exporter/opentelemetry-exporter-credential-provider-gcp",
+ "sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/sampler",
]
# We should also add type hints to the test suite - It helps on finding bugs.
# We are excluding for now because it's easier, and more important to add to the instrumentation packages.
|
Made changes needed to make |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
|
This PR has been closed due to inactivity. Please reopen if you would like to continue working on it. |
|
Seems I can't re-open the PR. Can a maintainer help re-open this? @xrmx @tammy-baylis-swi |
|
@jj22ee done |
Description
Changes:
RuleCache_SamplingRuleAppliers, ordered by rule priority then rule name. Each Rule Applier corresponds to the Sampling Rule from GetSamplingRules. Each call to GetSamplingRules will only update theRules that have changed properties, to preserve the state of unchanged rules. This means Reservoir and Statistics will persist in Rules for unchanged rules._SamplingRuleApplier._SamplingRuleApplierwill sample the requests.GetSamplingTargetscall to determine the next target_SamplingRuleApplierto perform Fixed Rate & Reservoir Sampling, and to include a method to apply matching logic against a set of {resource, attributes} by using the wild card and attribute matching from Utils_RateLimitingSampler(applied before the fixed rate sampler) to be used in each rule applier.FallbackSampler, a combination of_RateLimitingSamplerandTraceIdRatioBasedsamplers to sample1 req/secand5%of additional requests in that second._InternalAwsXRayRemoteSamplerto depend onRuleCacheand aFallbackSamplerSampler for making sampling decisionsFixes #3305 -- This is the final PR to support X-Ray Remote Sampling.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.