r/apachekafka • u/Signadot Vendor • 5d ago
Tool Getting OpenTelemetry trace context through Debezium into Kafka headers
Hey folks, we just published a tutorial on getting OpenTelemetry trace context through Debezium into Kafka headers. Might be helpful to anyone running CDC who wants traces to survive the hop.
With CDC the service never produces the Kafka record, so whatever headers its request carried are gone by the time Debezium publishes the change. We store traceparent and baggage on the row with a trigger, then ExtractNewRecordState plus Kafka Connect's built-in HeaderFrom$Value moves them into headers, with no custom SMT or image. That works with any OpenTelemetry setup. Signadot is what we use on top so test environments can share one Postgres, connector and topic.
Hope it helps. Happy to answer any questions. Full transparency, I work for Signadot.
https://www.signadot.com/docs/tutorials/testing-debezium-cdc