...
The proposed approach is that:
- Callers:
- Issue a new, unique InvocationID UUID for each downstream call they make.
- Log the intent new InvocationID, indicating the intent to invoke with :
- With Markers INVOKE, and SYNCHRONOUS if the invocation is synchronous.
- With their own InvocationID still set as an MDC.
- Pass the InvocationID as an X-InvocationID REST header.
- Invoked components:
- Retrieve the InvocationID from REST headers upon invocation, or generate a UUID default.
- Set the InvocationID MDC.
- Write a log entry with the Marker ENTRY. (In EELF this will be to the AUDIT log).
- Act as per Callers in all downstream requests.
- Write a log entry with the Marker EXIT upon return. (In EELF this will be to the METRIC log).
- Unset the InvocationID MDC all MDCs on exit.
That seems onerous, but:
...