Class SpringWebfluxTelemetryBuilder
java.lang.Object
io.opentelemetry.instrumentation.spring.webflux.v5_3.SpringWebfluxTelemetryBuilder
A builder of
SpringWebfluxTelemetry.-
Method Summary
Modifier and TypeMethodDescriptionaddClientAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.springframework.web.reactive.function.client.ClientRequest, org.springframework.web.reactive.function.client.ClientResponse> attributesExtractor) Adds an additionalAttributesExtractorto invoke to set attributes to instrumented items for WebClient.addServerAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.springframework.web.server.ServerWebExchange, org.springframework.web.server.ServerWebExchange> attributesExtractor) Adds an additionalAttributesExtractorto invoke to set attributes to instrumented items.build()Returns a newSpringWebfluxTelemetrywith the settings of thisSpringWebfluxTelemetryBuilder.setCapturedClientRequestHeaders(List<String> requestHeaders) Configures the HTTP WebClient request headers that will be captured as span attributes.setCapturedClientResponseHeaders(List<String> responseHeaders) Configures the HTTP WebClient response headers that will be captured as span attributes.setCapturedServerRequestHeaders(List<String> requestHeaders) Configures the HTTP request headers that will be captured as span attributes from server instrumentation.setCapturedServerResponseHeaders(List<String> responseHeaders) Configures the HTTP response headers that will be captured as span attributes from server instrumentation.setCaptureExperimentalSpanAttributes(boolean captureExperimentalSpanAttributes) Sets whether experimental attributes should be set to spans.
-
Method Details
-
addClientAttributesExtractor
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder addClientAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.springframework.web.reactive.function.client.ClientRequest, org.springframework.web.reactive.function.client.ClientResponse> attributesExtractor) Adds an additionalAttributesExtractorto invoke to set attributes to instrumented items for WebClient. -
setCapturedClientRequestHeaders
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setCapturedClientRequestHeaders(List<String> requestHeaders) Configures the HTTP WebClient request headers that will be captured as span attributes.- Parameters:
requestHeaders- A list of HTTP header names.
-
setCapturedClientResponseHeaders
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setCapturedClientResponseHeaders(List<String> responseHeaders) Configures the HTTP WebClient response headers that will be captured as span attributes.- Parameters:
responseHeaders- A list of HTTP header names.
-
setCaptureExperimentalSpanAttributes
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setCaptureExperimentalSpanAttributes(boolean captureExperimentalSpanAttributes) Sets whether experimental attributes should be set to spans. These attributes may be changed or removed in the future, so only enable this if you know you do not require attributes filled by this instrumentation to be stable across versions. -
addServerAttributesExtractor
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder addServerAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.springframework.web.server.ServerWebExchange, org.springframework.web.server.ServerWebExchange> attributesExtractor) Adds an additionalAttributesExtractorto invoke to set attributes to instrumented items. -
setCapturedServerRequestHeaders
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setCapturedServerRequestHeaders(List<String> requestHeaders) Configures the HTTP request headers that will be captured as span attributes from server instrumentation.- Parameters:
requestHeaders- A list of HTTP header names.
-
setCapturedServerResponseHeaders
@CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setCapturedServerResponseHeaders(List<String> responseHeaders) Configures the HTTP response headers that will be captured as span attributes from server instrumentation.- Parameters:
responseHeaders- A list of HTTP header names.
-
build
Returns a newSpringWebfluxTelemetrywith the settings of thisSpringWebfluxTelemetryBuilder.
-