If you're running Quarkus with JSON logging and shipping to OpenSearch,
there's a non-obvious bug waiting for you: every numeric field you put
in MDC arrives in OpenSearch as a string.
This means queries like durationMs > 1000 silently return nothing.
No error. No warning. Just wrong results.
Here's why it happens and two ways to fix it.
The problem
Quarkus uses JBoss Log Manager under the hood. When you set MDC values:
MDC . put ( "durationMs" , String . valueOf ( duration )); MDC . put ( "fundsProcessed" , String . valueOf ( count ));
Enter fullscreen mode
Exit fullscreen mode
The SLF4J MDC API only accepts String .…