Class MessagingAttributesExtractorBuilder<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractorBuilder<REQUEST,RESPONSE>
A builder of
MessagingAttributesExtractor.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newMessagingAttributesExtractorwith the settings of thisMessagingAttributesExtractorBuilder.setCapturedHeaders(List<String> capturedHeaders) Configures the messaging headers that will be captured as span attributes.
-
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 newMessagingAttributesExtractorwith the settings of thisMessagingAttributesExtractorBuilder.
-