woshiluziyi commented on issue #16165: URL: https://github.com/apache/dubbo/issues/16165#issuecomment-4311878265
"From my understanding, manual `put` is required. Dubbo 3.3.2 is responsible for the transmission of attachments at the RPC protocol layer, while MDC belongs to the thread context of the logging framework layer. There is no automatic synchronization between the two, so developers must complete it manually via a Filter. After Dubbo receives the TraceId, it stores it in the `attachments` of the `Invocation` object, which is placed in a heap memory object, whereas `MDC.get()` looks for the `ThreadLocal` of the current thread. If you don't manually take it out from the object and push it into the context, it will always be null. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
