Skip to content

Commit 2c68700

Browse files
committed
Ensure exported spans are unsampled + set default anomaly condition usage logic
1 parent 0149cd3 commit 2c68700

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/XrayRulesSampler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ void adaptSampling(ReadableSpan span, SpanData spanData, Consumer<ReadableSpan>
245245
shouldCaptureAnomalySpan = true;
246246
break;
247247
}
248+
} else {
249+
shouldBoostSampling = true;
250+
shouldCaptureAnomalySpan = true;
248251
}
249252
}
250253
if (shouldBoostSampling && shouldCaptureAnomalySpan) {
@@ -300,6 +303,7 @@ void adaptSampling(ReadableSpan span, SpanData spanData, Consumer<ReadableSpan>
300303
}
301304

302305
if (shouldBoostSampling
306+
&& !span.getSpanContext().isSampled()
303307
&& ruleToReportTo != null
304308
&& ruleToReportTo.hasBoost()
305309
&& this.anomalyTracesSet.add(traceId)) {

0 commit comments

Comments
 (0)