Class KafkaAttributesExtractorUtils

java.lang.Object
io.micronaut.tracing.opentelemetry.instrument.kafka.KafkaAttributesExtractorUtils

@Internal public final class KafkaAttributesExtractorUtils extends Object
Utility class to help get kafka headers and put them as span attributes.
Since:
5.0.0
  • Method Details

    • putAttributes

      public static void putAttributes(KafkaTelemetryConfiguration kafkaTelemetryConfiguration, io.opentelemetry.api.common.AttributesBuilder attributes, org.apache.kafka.common.header.Headers headers)
      Add message headers as span attributes.
      Parameters:
      kafkaTelemetryConfiguration - kafkaTelemetryProperties
      attributes - attributes builder
      headers - kafka message headers