reactor-kafka
reactor-kafka copied to clipboard
Micrometer tracing context propagation problem
Expected Behavior
ParentID should be propagated correctly, so full trace can be visualized in Jaeger.
Actual Behavior
TraceID is preserved but ParentID is lost which leads to flat span tree in Jaeger. Moreover there's a ParentID reported in Jaeger as missing which is visible in the logs.
It looks like some intermediate span(s) is not propagated to Jaeger correctly.
Steps to Reproduce
Please have a look at this simple example.
https://github.com/mzalewski82/reactor-kafka-tracing
It contains 2 Spring Boot apps.
web which is exposing a REST API.
Data received through this API is saved in MongoDB using Spring Data reactive repo (context propagation is ok here).
Same data is pushed to Kafka
'kafka-reactor-clientreads this data from 'Kafka' using 2 different clients. One is usingKafkaReceiver another one 'ReactiveKafkaConsumerTemplate. Both share the same tracing parent propagation problem.
- Run infra using attached docker-compose file.
- Run both apps
- Call http://localhost:8080/hello?name=NiceName
- Check Jaeger http://localhost:16686
Your Environment
- Reactor version(s) used: 3.6.2
- Other relevant libraries versions (eg.
netty, ...): Spring Boot 3.2.2, reactor-kafka 1.3.22 - JVM version (
java -version): 17 zulu or 21 graalvmce - OS and version (eg
uname -a): macOS Sonoma 14.3.1
Upvote