Mdc Attributes

1 attribute in this category. 1 stable

Stable Attributes

mdc.<key>

string PII: Maybe OTel: False Dynamic

Attributes from the Mapped Diagnostic Context (MDC) present at the moment the log record was created. The MDC is supported by all the most popular logging solutions in the Java ecosystem, and it's usually implemented as a thread-local map that stores context for e.g. a specific request.

Example mdc.some_key='some_value'
SDKs javajava.logbackjava.juljava.log4j2
Dynamic Suffix Yes - the key contains dynamic parts
Raw JSON
{
  "key": "mdc.<key>",
  "brief": "Attributes from the Mapped Diagnostic Context (MDC) present at the moment the log record was created. The MDC is supported by all the most popular logging solutions in the Java ecosystem, and it's usually implemented as a thread-local map that stores context for e.g. a specific request.",
  "has_dynamic_suffix": true,
  "type": "string",
  "pii": {
    "key": "maybe"
  },
  "is_in_otel": false,
  "example": "mdc.some_key='some_value'",
  "sdks": [
    "java",
    "java.logback",
    "java.jul",
    "java.log4j2"
  ]
}