Class TracingConsumerInterceptor<K,V>
java.lang.Object
io.opentelemetry.instrumentation.kafkaclients.v2_6.TracingConsumerInterceptor<K,V>
- All Implemented Interfaces:
AutoCloseable,org.apache.kafka.clients.consumer.ConsumerInterceptor<K,,V> org.apache.kafka.common.Configurable
public class TracingConsumerInterceptor<K,V>
extends Object
implements org.apache.kafka.clients.consumer.ConsumerInterceptor<K,V>
A ConsumerInterceptor that adds tracing capability. Add this interceptor's class name or class
via ConsumerConfig.INTERCEPTOR_CLASSES_CONFIG property to your Consumer's properties to get it
instantiated and used. See more details on ConsumerInterceptor usage in its Javadoc.
-
Constructor Details
-
TracingConsumerInterceptor
public TracingConsumerInterceptor()
-
-
Method Details
-
onConsume
-
onCommit
public void onCommit(Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets) -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.apache.kafka.clients.consumer.ConsumerInterceptor<K,V>
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-