conduktor.io ↗

KIP-1338 — Structured MDC Context for Kafka Logging

Discussion BrokerClientConnect

Populates the SLF4J Mapped Diagnostic Context with standardized fields (kafka.node.id, kafka.topic, kafka.partition, kafka.client.id, kafka.component) across broker, controller, and client components, and ships ready-to-use JSON Log4j2 configuration files. KIP-653 made JsonTemplateLayout available in Kafka 4.0, but only Kafka Connect sets MDC (via KIP-449), so structured logging emits null for every context field and identifying attributes stay trapped in message-string prefixes that log aggregators can only extract with custom regex.

Details

AuthorHaifeng Chen
StatusDiscussion
JIRAKAFKA-20573
WikiView on Apache Wiki
Created2026-05-12
Last Modified2026-05-12
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.