-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate span-context for Kafka Clients by injecting and extracting in message headers #1113
Comments
There is code in place to propagate trace context via kafka headers: Line 114 in 7969a83
|
I tried in debug mode and can see traceparent ( traceId-spanId.. ) in headers. But issue is spans from producers and consumers are not getting stitched in Jaeger. There are separate Traces/spans for producer and consumer messages. It lead me to assumption that context in not propagated. Can see no extract here In java-kafka-client it's done here |
Hi @mnottheone! Kafka propagation works for me, can you provide a standalone repro so we can try it out and see what might be different for your case? |
Hi! I tried replicating in standalone, it was working. I simply removed some extra code for JaegerTracer (Jaeger and OpenTracing libs) and it also started working. Thanks a lot for prompt responses. Closing this issue. |
@mnottheone I am facing the same issue where the producer and consumer traces are reported separately . Is there any config that I need to tune ? I am using Jaeger (1.27) as backend. |
Hey @vimal3271 , |
Hi, I am experiencing a similar problem where I am getting separate traces for producer and consumer instead of a single flow. I am using auto instrumentation and using Zipkin backend. I have also checked through debug mode and ensured that the headers are present, so I am not able to analyze if this is a propagation issue or something else. |
I have the same issue @Samarth888 I get my http call in one trace nd producer in other trace o dont know what happen |
Right now, auto instrumentation records spans for Kafka clients, but context propagation is missing. Let me know if I am wrong and I tried running it myself and span-ids were missing in message headers.
Context propagation for Kafka clients was supported for opentracing using java-kafka-client . This is really helpful for applications involving Kafka.
Changes involved will be implementing inject and extract in TextMapPropagator. I can see explicitly only propagator's setter and getter are implemented in InjectAdapter and extractAdapter. Any specific reasons? Didn't find any blocker in OpenTelemetery API.
Can we add context propagation for kafka clients ?
I don't know the best way to get it done. But happy to learn and make a pull request.
The text was updated successfully, but these errors were encountered: