question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kafka autoinstrumentation trace propagator doesn't work out of the box

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
anuraagacommented, Feb 16, 2022

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

0reactions
lauritcommented, Jun 9, 2022

Feel free to reopen if you have more questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka autoinstrumentation trace propagator doesn't work out of the box
Describe the bug When an application with otel auto-instrumentation publishes a message to a Kafka topic it generates a trace (b3multi or tracecontex...
Read more >
Propagate span-context for Kafka Clients by injecting ... - GitHub
Right now, auto instrumentation records spans for Kafka clients, but context propagation is missing. Let me know if I am wrong and I...
Read more >
Manual Instrumentation | OpenTelemetry
The OpenTelemetry SDK offers four samplers out of the box: AlwaysOnSampler which samples every trace regardless of upstream sampling decisions. AlwaysOffSampler ...
Read more >
spring-cloud/spring-cloud-sleuth - Gitter
I am using sleuth to inject values into MDC using extrafield propagation. I added this code in a WebFilter. Filter is getting called...
Read more >
Spring Cloud Sleuth customization
Sleuth does not work with parallelStream() out of the box. If you want to have the tracing information propagated through the stream, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found