After my research I decided to log from each component for every request: time, localization and some kind of request-ID. Then take it all together and sort by ID. Then I can have information how long does it take to go through single component for each request, what is exactly what I need.
My problem is I don’t know how to pass ID across the system (threads are created e.g. by RMI). My idea was to set the same thread name to all threads connected to one request (see discusion here), but I still need some advice how to do this. Or maybe there is better idea to gather threads together?
The way I have done this is to pass a String containing a timestamp of all the key steps in the process. At the end I have a complete end-to-end record of all the timing. This means passing an extra argument, but since the reporting is much simpler it can be worth it.