Java spring multithreaded log trace

to facilitate logging, I have added a trackId, for each request and operation, but there is a problem
such as a user requests an interface, and in the process, this process may go through the following process
spring controller thread "message queuing thread". All kinds of multithreading.
starting with the controller thread is just an analogy. In fact, the thread of controller in the project is not so complex, it is some business processing that is complicated. Business processing is accompanied by thread interlacing, such as scheduled tasks Synchronize data, statistics, and so on
In essence, I expect that there is some framework or tool that can well define tracking schemes in complex businesses and complex threads.

Aug.02,2021

pinpoint has this function of request tracking


then you can only pass trackId as a parameter

Menu