You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to #879, for async baggage propagation, we do not close baggageInScope.
But the baggage cannot be reverted even after scopedSpan#end when using micrometer-tracing-bridge-otel, but if using micrometer-tracing-bridge-brave, the baggage will be reverted.
Tested with the latest version (1.4.1):
@BeanCommandLineRunnercommandLineRunner1(Tracertracer) {
returnargs -> {
ScopedSpanscopedSpan = tracer.startScopedSpan("test");
try {
// We do not close baggageInScope for async baggage propagation.BaggageInScopebaggageInScope = tracer.getBaggage("xyz").makeCurrent("123");
ExecutorServiceexecutorService = ContextExecutorService.wrap(Executors.newCachedThreadPool(), ContextSnapshot::captureAll);
executorService.execute(() -> {
try {
// do some work...Thread.sleep(3000);
// check baggageStringxyz = tracer.getBaggage("xyz").get();
Assert.state(xyz.equals("123"), "Baggage should be propagated");
} catch (InterruptedExceptione) {
thrownewRuntimeException(e);
}
});
} finally {
scopedSpan.end();
}
Stringxyz = tracer.getBaggage("xyz").get();
Assert.state(xyz == null, "Baggage should be reverted"); // failed when using otel, succeed when using brave
};
}
The text was updated successfully, but these errors were encountered:
According to #879, for async baggage propagation, we do not close baggageInScope.
But the baggage cannot be reverted even after scopedSpan#end when using
micrometer-tracing-bridge-otel
, but if usingmicrometer-tracing-bridge-brave
, the baggage will be reverted.Tested with the latest version (1.4.1):
The text was updated successfully, but these errors were encountered: