Class TracingProducerInterceptor<K,V>
java.lang.Object
io.opentelemetry.instrumentation.kafkaclients.v2_6.TracingProducerInterceptor<K,V>
- All Implemented Interfaces:
org.apache.kafka.clients.producer.ProducerInterceptor<K,,V> org.apache.kafka.common.Configurable
public class TracingProducerInterceptor<K,V>
extends Object
implements org.apache.kafka.clients.producer.ProducerInterceptor<K,V>
A ProducerInterceptor that adds tracing capability. Add this interceptor's class name or class
via ProducerConfig.INTERCEPTOR_CLASSES_CONFIG property to your Producer's properties to get it
instantiated and used. See more details on ProducerInterceptor usage in its Javadoc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidonAcknowledgement(org.apache.kafka.clients.producer.RecordMetadata recordMetadata, Exception e)
-
Constructor Details
-
TracingProducerInterceptor
public TracingProducerInterceptor()
-
-
Method Details
-
onSend
-
onAcknowledgement
public void onAcknowledgement(org.apache.kafka.clients.producer.RecordMetadata recordMetadata, Exception e) -
close
public void close() -
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-