Adding attributes to a span when using Kafka client instrumentation with opentelemetry-spring-boot-starter #14145
Unanswered
dejan-kosak
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I use "opentelemetry-spring-boot-starter" (with Kafka instrumentation included) to instrument my app.
I have Kafka producer, where I provide parent context and send the message.
This works and I get a trace with a new span created by kafkaTemplate which is also connected with the parent context.
Now, I would like to enrich the span that is created with kafkaTemplate. For that I am creating ProducerInterceptor which is set to AbstractKafkaListenerContainerFactory.
The problem that I have is, that the span that I get in interceptor is not the span that is created by kafkaTemplate. It is the span from parent context.
How to do this the right way? Any help would be appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions