-
Hi, tl;dr - MirrorMaker2 seems to change message headers that contain the traceparent id. is there a way to keep it from changing it? I have two Kafka Strimzi Clusters: dc1 and dc2 I have a producer (quay.io/strimzi-examples/java-kafka-producer:latest) in dc1, a mirrormaker between dc1 and dc2 and a consumer in dc2 (quay.io/strimzi-examples/java-kafka-consumer:latest) Basically like this: Now if I simply add Jaeger to the game and enable tracing on producer and consumer I can see the flow very beautifully I however would like to include MirrorMaker into the tracing-flow, so I can see wether something goes wrong while replicating.
If I now look at my traces I get not one complete end-to-end trace in Jaeger but only parts of the flow: I get this part Producer -> Dc1 -> Mirrormaker and I get this part Mirrormaker -> DC2 -> Consumer This shows me nicely that MirrorMaker is doing something, but again it is not really helpful - since I would like to see the whole flow. I am pretty sure that is due to the fact that MirrorMaker is not keeping the traceparent in the message header consistent, but changing it - one example:
Is there a way to stop MirrorMaker2 from changing the header and just reuse it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I will add something I found - maybe that is correct. The OTEL default producer interceptor will create a new trace-span when used and not keep the current one alive? So in order to get this fixed - one would either need a different producer interceptor or add that feature to the OTEL default kafka prodcuer interceptor? |
Beta Was this translation helpful? Give feedback.
-
Hi @Fobhep, I'm not very familiar with OTEL, but from what you've shared I think you are correct that it's because Mirror Maker is consuming and then creating it's own producer, which is what is triggering the new trace-span to be used. So I agree that having an option for the OTEL default kafka producer interceptor to reuse an existing trace-span seems to me to be the right move. |
Beta Was this translation helpful? Give feedback.
@Fobhep yes you are right. As you saw I faced this issue in the past mainly because how the Kafka producer works (having a thread filling the buffer and another sending the message) so the context is kind of lost across threads. Anyway there is nothing we can do at Mirror Maker level, it's part of the OTEL producer interceptor.