I found myself stuck on an unconventional problem. I am to write a component in Java that will gather some information from a multi-thread system. I will appreciate any information or advice that could help me progress. Here are some details:
-system contains many subsystems that exchange information between each other (e.g. one component can run other component to do some logging or calculate data)
-each operation performed on the system is more of a chain of commands and leads to running few components in a row,
-system gets a great number of requests and operations have no ID so its hard to keep track of which operation belongs to which chain (I need to get the time of operation on every step of the chain)
The problems I have to deal with: -lack of IDs on operations -eventual exchanging IDs between subsystems -least possible change of code (Its a HUGE system) -eventually finding existing open-source solution to this kind of problem (or at least some part of it)
Here is and example result of my component from a single operation:
Search nr 60
Component1 45s Component6 2s Component4 32s Component2 4s
Where 45, 2, 32, 4 stand for the time spent in each component
If anyone found himself solving similar problem or has experience in the field of logging/information gathering, your advice can greatly help me.
Edit: I created component in AspectJ which can measure time 'around' every method and gather together results from each subsystem. The main problem is I cannot identify which log belong to which request (e.g. particular "search no. 60" or "add no. 5" request). So the question is: is any effective way to create request-ID which can be transferred (and how to transfer it) with control flow without massive source-code change?