MDC adds contextual information to logs, like Correlation IDs.
Mapped Diagnostic Context (MDC) allows developers to add contextual information, such as Correlation IDs, to application logs. This makes it easier to filter and analyze logs related to specific requests. For instance, in a scenario where a request fails in a distributed e-commerce system, MDC can help pinpoint the service and operation that caused the issue.
Additional Notes
How does MDC enhance logging in a distributed tracing setup?