Hello,
I've created a handler to fill MDC from incoming request header.
public class CorrelationHandler implements HttpHandler
{
private HttpHandler next;
public CorrelationHandler(HttpHandler next) {
this.next = next;
}
@Override
public void handleRequest(HttpServerExchange e) throws Exception {
String corr = e.getRequestHeaders().getFirst("IDP-CORR-ID");
MDC.put("corr", corr);
next.handleRequest(e);
}
}
But most of my processing is done in worker thread and mdc is not passed
threre. How to pass it?