davsclaus commented on PR #15496: URL: https://github.com/apache/camel/pull/15496#issuecomment-2354690625
> @davsclaus are we guaranteed to be called on the same Thread though in the UnitOfWork hooks ? Unfortunately OpenTelemetry requires it [1] > > [1] https://github.com/open-telemetry/opentelemetry-java/blob/main/context/src/main/java/io/opentelemetry/context/ThreadLocalContextStorage.java#L48 Yes but only when you use before/afterProcess callbacks and turn this on (like MDC does) https://github.com/apache/camel/blob/b4b66d5b9dc9ce44a5ed497076fd837c73b70b0c/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/SharedCamelInternalProcessor.java#L161 I think this was implemented for the same reason that MDC also needs callback for before/after on the same thread. PS: It may be that Camel in transacted mode does not execute before/after processor (we can add this if needed) but transacted is forced executing synchronously anyway by Camel. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
