-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Expected Behavior
Logging MDC values like resource.name and resource.namespace are correct for reconciled resources in question
Actual Behavior
When multiple reconciliations are happening at once, the MDC values seem to be "random" and could be set to any values for any of the reconciliations.
Notes
When enabling JSON logging and looking at the MDC values provided out of the box by the framework I noticed that the values were pretty jumbled when a lot of reconciliations were happening in parallel. I assume this is because the underlying Java Operator SDK is responsible for the values, as documented here, and it doesn't play well with the Quarkus threading approach.
If I add my own interceptor and clear the MDC and re-add those values, things appear to stick as expected, from my limited testing
I don't see a way to disable the JOSDK values, or that the Quarkus Operator will inject it's own (with the appropriate threading model for the MDC).