reactor / reactor-kafka

Reactive Kafka Driver with Reactor
http://projectreactor.io
613 stars 227 forks source link

Micrometer tracing context propagation problem #383

Open mzalewski82 opened 7 months ago

mzalewski82 commented 7 months ago

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 usingKafkaReceiveranother one 'ReactiveKafkaConsumerTemplate. Both share the same tracing parent propagation problem.

  1. Run infra using attached docker-compose file.
  2. Run both apps
  3. Call http://localhost:8080/hello?name=NiceName
  4. Check Jaeger http://localhost:16686

Your Environment

KafkaProServerless commented 7 months ago

Upvote