@@ -892,7 +892,7 @@ index 1ef8abf5..328e63dd 100644
892892 }
893893 }
894894diff --git a/aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/XrayRulesSampler.java b/aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/XrayRulesSampler.java
895- index 75977dc0..d24148d2 100644
895+ index 75977dc0..75c39807 100644
896896--- a/aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/XrayRulesSampler.java
897897+++ b/aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/XrayRulesSampler.java
898898@@ -5,15 +5,24 @@
@@ -1051,7 +1051,7 @@ index 75977dc0..d24148d2 100644
10511051 }
10521052 }
10531053
1054- @@ -96,7 +170,153 @@ final class XrayRulesSampler implements Sampler {
1054+ @@ -96,7 +170,154 @@ final class XrayRulesSampler implements Sampler {
10551055 return "XrayRulesSampler{" + Arrays.toString(ruleAppliers) + "}";
10561056 }
10571057
@@ -1154,6 +1154,7 @@ index 75977dc0..d24148d2 100644
11541154+
11551155+ // Anomaly Capture
11561156+ if (shouldCaptureAnomalySpan
1157+ + && !span.getSpanContext().isSampled()
11571158+ && anomalyCaptureRateLimiter != null
11581159+ && anomalyCaptureRateLimiter.trySpend(1)) {
11591160+ spanBatcher.accept(span);
@@ -1206,7 +1207,7 @@ index 75977dc0..d24148d2 100644
12061207 return Arrays.stream(ruleAppliers)
12071208 .map(rule -> rule.snapshot(now))
12081209 .filter(Objects::nonNull)
1209- @@ -115,15 +335 ,16 @@ final class XrayRulesSampler implements Sampler {
1210+ @@ -115,15 +336 ,16 @@ final class XrayRulesSampler implements Sampler {
12101211 Map<String, SamplingTargetDocument> ruleTargets,
12111212 Set<String> requestedTargetRuleNames,
12121213 Date now) {
@@ -1225,7 +1226,7 @@ index 75977dc0..d24148d2 100644
12251226 }
12261227 if (requestedTargetRuleNames.contains(rule.getRuleName())) {
12271228 // In practice X-Ray should return a target for any rule we requested but
1228- @@ -135,6 +356 ,59 @@ final class XrayRulesSampler implements Sampler {
1229+ @@ -135,6 +357 ,59 @@ final class XrayRulesSampler implements Sampler {
12291230 return rule;
12301231 })
12311232 .toArray(SamplingRuleApplier[]::new);
0 commit comments