liveBook · Manning

Mapped diagnostic context

Also called MDC

A mapped diagnostic context is a set of key-value data associated with an execution context so logging systems can include that information in log records.

How 2 Manning books explain it

Grokking Software Architecture

Mapped Diagnostic Context is an application-level mechanism that associates contextual data with an execution thread so logging frameworks can attach that data to log messages.

How it is used
Enriches downstream logs with request context while keeping telemetry variables out of business signatures.
How deep it goes
Defines thread-local storage and explains metadata binding, downstream logging, and scoped cleanup.
Examples
Uses tenantId and orderId metadata, including an instrumented checkout operation.
What you can do after
Apply it via SLF4J MDC to correlate structured logs with a transaction identifier.

Read how Grokking Software Architecture explains mapped diagnostic context →

The Art of Code

Mapped Diagnostic Context is a per-execution logging context that automatically associates key-value information with log records.

How it is used
Enriches enterprise failure logs with execution-level context for faster investigation and correlation.
How deep it goes
Defines automatic contextual enrichment and its rationale but does not explain configuration or lifecycle mechanics.
Examples
Uses a transaction ID attached to every log produced during one execution flow.
What you can do after
Apply it to associate shared execution context with log records without repeating that context manually.

Read how The Art of Code explains mapped diagnostic context →

Related concepts

Questions about mapped diagnostic context

What is mapped diagnostic context?

A mapped diagnostic context is a set of key-value data associated with an execution context so logging systems can include that information in log records.

Which Manning books explain mapped diagnostic context?

Grokking Software Architecture and The Art of Code.

What is mapped diagnostic context a kind of?

Mapped diagnostic context is a kind of context. Context is relevant information, state, or circumstances that shape how an input, decision, or activity is interpreted or carried out.

What is mapped diagnostic context also called?

Mapped diagnostic context is also called MDC.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.