Class KafkaConsumerAdditionalAttributesExtractor

java.lang.Object
io.opentelemetry.instrumentation.kafka.internal.KafkaConsumerAdditionalAttributesExtractor
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,Void>

public final class KafkaConsumerAdditionalAttributesExtractor extends Object implements io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,Void>
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord, Void unused, Throwable error)
     
    void
    onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord)
     

    Methods inherited from class java.lang.Object

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

    • KafkaConsumerAdditionalAttributesExtractor

      public KafkaConsumerAdditionalAttributesExtractor()
  • Method Details

    • onStart

      public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord)
      Specified by:
      onStart in interface io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,Void>
    • onEnd

      public void onEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> consumerRecord, @Nullable Void unused, @Nullable Throwable error)
      Specified by:
      onEnd in interface io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>,Void>