Instrumentation of Kafka Clients : Add custom Attributes Extractor #9516
Unanswered
adityasc94
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can copy the interceptor class and modify the way it builds the |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the interceptors provided by Kafka clients instrumentation library in a simple Kafka Producer by following the example in: https://github.com/ppatierno/kafka-opentelemetry/tree/main/kafka-producer
I want send custom attributes to the span.
The KafkaTelemetryBuilder class has a method "addProducerAttributesExtractors" to add extra AttributesExtractor:
opentelemetry-java-instrumentation/instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/main/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/KafkaTelemetryBuilder.java
I would like to know if there is a way to use this approach along with the interceptors.
Beta Was this translation helpful? Give feedback.
All reactions