Class MessagingAttributesExtractorBuilder<REQUEST,RESPONSE>

java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractorBuilder<REQUEST,RESPONSE>

public final class MessagingAttributesExtractorBuilder<REQUEST,RESPONSE> extends Object
  • Method Details

    • setCapturedHeaders

      @CanIgnoreReturnValue public MessagingAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedHeaders(List<String> capturedHeaders)
      Configures the messaging headers that will be captured as span attributes.

      The messaging header values will be captured under the messaging.header.<name> attribute key. The <name> part in the attribute key is the normalized header name: lowercase, with dashes replaced by underscores.

      Parameters:
      capturedHeaders - A list of messaging header names.
    • build

      public io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE> build()
      Returns a new MessagingAttributesExtractor with the settings of this MessagingAttributesExtractorBuilder.