Record tracing
Add source lineage headers to replicated records.
When a record lands on the target Kafka cluster, operators often need to know which source topic, partition, and offset it came from — especially during failover or migration debugging. Kafka does not attach lineage metadata by default, therefore we inject tracing headers at replication time.
Set features.tracingHeaders: enabled to write source topic, partition, and offset into record headers using the names under tracing.headers. Tracing headers are separate from metrics; for pipeline health, see Observability.
Prerequisites
Topic selection and data routing configured
Example
name: "my_pipeline"
features:
tracingHeaders: enabled
source:
kafka:
common:
"bootstrap.servers": "source:9092"
consumer:
"group.id": "my-k2k-group"
target:
kafka:
common:
"bootstrap.servers": "target:9092"
tracing:
headers:
topic: "x-source-topic"
replication:
- source:
topic: "orders.*"
- sink:
topic: source
partition: sourceConfiguration keys
Feature toggles
features.tracingHeaders
Inject tracing headers on replicated records (enabled, disabled, or per header object)
No
disabled
Replicator
features.tracingHeaders.partition
Inject source partition tracing header
No
disabled
Replicator
features.tracingHeaders.offset
Inject source offset tracing header
No
disabled
Replicator
features.tracingHeaders.topic
Inject source topic tracing header
No
disabled
Replicator
features.tracingHeaders.pipeline
Inject pipeline name tracing header
No
disabled
Replicator
Header names
tracing.headers.partition
Header name for source partition
No
__k2k_partition
Replicator
tracing.headers.offset
Header name for source offset
No
__k2k_offset
Replicator
tracing.headers.topic
Header name for source topic
No
__k2k_topic
Replicator
tracing.headers.pipeline
Header name for pipeline name
No
__k2k_pipeline
Replicator
Last updated
Was this helpful?

