Closed vamseeds closed 2 months ago
The issue here is, that MDC propagation is not currently happening, when Helidon Context is not prosent. I took a look into the code and could not find a reason, why it should not. This should be changed.
To make this work before fix will be out, please add the following dependency
<dependency>
<groupId>io.helidon.webserver</groupId>
<artifactId>helidon-webserver-context</artifactId>
</dependency>
fixed
Environment Details
Problem Description
Current Behaviour:
Helidon MDC Context is not propagated when we use a async code activity like creating CompletableFuture or ExecutorService to executing code
Expected Behaviour:
Helidon MDC Context should be propagated when we use a async code activity like creating CompletableFuture or ExecutorService to executing code
Consistency: Above problem is consistent Sample code:
ExecutorService newEs = Contexts.wrap(Executors.newSingleThreadExecutor()); CompletableFuture.runAsync(() -> LOGGER.info("Running on newES thread {}", HelidonMdc.get("foo")),newEs);
Steps to reproduce
Current Output:
Expected Output: