MDC adds context to logs by attaching trace information.
Mapped Diagnostic Context (MDC) in logging frameworks like Logback enables you to add metadata, such as Correlation IDs, to log entries. This context allows developers to see how a request traverses different services. For example, when a user places an order, MDC can log all related actions with the same Correlation ID, helping to debug order processing issues.