This page describes all problems, tasks and solution approaches regarding tracing of method invocations that can span over multiple JVMs.
Main topics
- How to tell the method who is its caller or parent on the previous JVM.
- What should be transmitted to other agents, whole trace or just IDs?
- How to Transmit the context information?
- How can i manipulate the communication of between JVM(RPC). Is there a solution that works for every RMI implementation or even for every communication protocol?
...
Place the information even before the message gets to the sending unit.
(Probably the method signature has to be changed. Research)
Idea 2:
Sending the ID of the transaction context parallel to the communication of the monitored application.
For example use ssh tunneling to send a preparing message to the other agent. This way the receiving agent would know, that the next incoming message is in context of a particular transaction.
Maybe its possible to use the ssh tunneling to synchronize the messages and make sure, that no message goes between the "heads-up" and the actual message from the application.
...