Kafka autoinstrumentation trace propagator doesn't work out of the box
See original GitHub issueDescribe the bug
When an application with otel auto-instrumentation publishes a message to a Kafka topic it generates a trace (b3multi or tracecontex or both, doesn’t matter). Let’s call Trace A
.
Then another application with otel auto-instrumentation picks up the message (there are present Kafka headers for the trace) processes it and puts it to another Kafka topic (or the same doesn’t matter).
Statement Each publish to Kafka by java application with auto-instrumentation doesn’t propagate trace, but generates a new one.
Steps to reproduce I have created a project which reproduces the issue with all the details provided. Please, ask if you need anything else.
What did you expect to see?
Trace A
generated initially is preserved in the last message. Context propagation is place.
What did you see instead?
Trace A
isn’t preserved, another trace is generated and put to header of the last Kafka message in the chain.
What version are you using? 1.10.1
Environment Compiler: (e.g., “Azul Java 17.0.0-zulu”) OS: (e.g., “macOS Monterey”)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:12 (8 by maintainers)
I think it’d be good for us to reconsider this default. I have gotten at least 5 reports from users about broken messaging tracing related to this flag now, I will likely change the default in the AWS distro but wonder if that would make sense here too given the feedback I’m seeing @trask @mateuszrzeszutek
Feel free to reopen if you have more questions.