I would like to add a log component to my services. The main goal is to be able to log events from any component connected to the same realm in order to be able to see what happens when the user starts an action: i.e. I want to see what they entered in the web UI, then which RPC is called then what the method does. For a developer, it should be easy to follow a chain of log events as the data flows through the system.
For that, I need to attach some kind of “ID” to each such chain of events and I’m thinking about the best way to do this. The most simple solution would be to create this ID on the client and pass it to every RPC call which sounds like a “too simple” solution - it just touches too much code.
But my feeling is that Autobahn needs to track results of RPC calls somehow, so it needs to have a similar mechanism and I was wondering whether I could tap into that somehow. Note that the ID doesn’t need to stay the same. If all log events created in a method can be grouped by the same ID, then eventually there will be an event “RPC was called” with the old ID plus the new one, so I could follow the chain.
I saw “discloseMe” in the code but I couldn’t find an example where it is used and, especially on the receiver’s end.