Correlation and causation
Correlation identifiers have been critical to monolithic application logging for as long as I can remember. This involves generating a unique identifier, which is then passed from function to function and included in any log outputs. That way, you can query lots of log entries using a single common identifier to correlate them together. This forms a trace within the logs so that you can observe a connected pattern of messaging from within the application code.
As we shift to microservices, this challenge goes beyond a single application process. Most commonly, correlation identifiers are propagated from one service to the next using HTTP for correlation.
When we move to event-driven architecture, we introduce a few new challenges to this correlation pattern.
Correlation identifiers need to persist across events by being included in the event message from the producer. Then, any consumer can reuse the correlation identifier in its own log output.
...