When logging, it would be very useful to differentiate between the output from concurrently processed messages.
Smith should provide an accessor for a unique identifier, either based on the current message ID or a sufficiently unique random value.
A logger can then add this execution context ID as metadata to each message, providing context for execution order. This will become significantly more helpful when used with a structured logger.
When logging, it would be very useful to differentiate between the output from concurrently processed messages.
Smith should provide an accessor for a unique identifier, either based on the current message ID or a sufficiently unique random value.
A logger can then add this execution context ID as metadata to each message, providing context for execution order. This will become significantly more helpful when used with a structured logger.