Class InstrumentedBatchInterceptor<K,V>

java.lang.Object
io.opentelemetry.javaagent.instrumentation.spring.kafka.InstrumentedBatchInterceptor<K,V>
All Implemented Interfaces:
org.springframework.kafka.listener.BatchInterceptor<K,V>

public final class InstrumentedBatchInterceptor<K,V> extends Object implements org.springframework.kafka.listener.BatchInterceptor<K,V>
  • Constructor Summary

    Constructors
    Constructor
    Description
    InstrumentedBatchInterceptor(io.opentelemetry.instrumentation.api.field.VirtualField<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>,io.opentelemetry.context.Context> receiveContextField, io.opentelemetry.instrumentation.api.field.VirtualField<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>,State<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>>> stateField, org.springframework.kafka.listener.BatchInterceptor<K,V> decorated)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    failure(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, Exception exception, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
     
    org.apache.kafka.clients.consumer.ConsumerRecords<K,V>
    intercept(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
     
    void
    success(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InstrumentedBatchInterceptor

      public InstrumentedBatchInterceptor(io.opentelemetry.instrumentation.api.field.VirtualField<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>,io.opentelemetry.context.Context> receiveContextField, io.opentelemetry.instrumentation.api.field.VirtualField<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>,State<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>>> stateField, @Nullable org.springframework.kafka.listener.BatchInterceptor<K,V> decorated)
  • Method Details

    • intercept

      public org.apache.kafka.clients.consumer.ConsumerRecords<K,V> intercept(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
      Specified by:
      intercept in interface org.springframework.kafka.listener.BatchInterceptor<K,V>
    • success

      public void success(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
      Specified by:
      success in interface org.springframework.kafka.listener.BatchInterceptor<K,V>
    • failure

      public void failure(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> records, Exception exception, org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
      Specified by:
      failure in interface org.springframework.kafka.listener.BatchInterceptor<K,V>