Skip to content

Commit d49ccdb

Browse files
committed
Attempt to fix the flaky StackedOperatorsTest on CI by not attaching the context if it is already attached.
1 parent c096994 commit d49ccdb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/main/java/datadog/trace/instrumentation/resilience4j/CircuitBreakerOperatorInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static void after(
4040
result,
4141
CircuitBreakerDecorator.DECORATE,
4242
circuitBreaker,
43-
InstrumentationContext.get(Publisher.class, AgentSpan.class)::put);
43+
InstrumentationContext.get(Publisher.class, AgentSpan.class)::putIfAbsent);
4444
}
4545
}
4646
}

dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/main/java/datadog/trace/instrumentation/resilience4j/RetryOperatorInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void after(
3939
result,
4040
RetryDecorator.DECORATE,
4141
retry,
42-
InstrumentationContext.get(Publisher.class, AgentSpan.class)::put);
42+
InstrumentationContext.get(Publisher.class, AgentSpan.class)::putIfAbsent);
4343
}
4444
}
4545
}

0 commit comments

Comments
 (0)