Class SpringWebfluxServerTelemetryBuilder
java.lang.Object
io.opentelemetry.instrumentation.spring.webflux.v5_3.SpringWebfluxServerTelemetryBuilder
A builder of
SpringWebfluxServerTelemetry.-
Method Summary
Modifier and TypeMethodDescriptionaddAttributesExtractor(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 newSpringWebfluxServerTelemetrywith the settings of thisSpringWebfluxServerTelemetryBuilder.setCapturedRequestHeaders(Collection<String> requestHeaders) Configures the HTTP request headers that will be captured as span attributes from server instrumentation.setCapturedResponseHeaders(Collection<String> responseHeaders) Configures the HTTP response headers that will be captured as span attributes from server instrumentation.setKnownMethods(Collection<String> knownMethods) Configures the instrumentation to recognize an alternative set of HTTP request methods.setSpanNameExtractor(Function<io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<org.springframework.web.server.ServerWebExchange>, io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<org.springframework.web.server.ServerWebExchange>> serverSpanNameExtractor) Sets custom serverSpanNameExtractorvia transform function.
-
Method Details
-
addAttributesExtractor
@CanIgnoreReturnValue public SpringWebfluxServerTelemetryBuilder addAttributesExtractor(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. -
setCapturedRequestHeaders
@CanIgnoreReturnValue public SpringWebfluxServerTelemetryBuilder setCapturedRequestHeaders(Collection<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.
-
setCapturedResponseHeaders
@CanIgnoreReturnValue public SpringWebfluxServerTelemetryBuilder setCapturedResponseHeaders(Collection<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.
-
setKnownMethods
@CanIgnoreReturnValue public SpringWebfluxServerTelemetryBuilder setKnownMethods(Collection<String> knownMethods) Configures the instrumentation to recognize an alternative set of HTTP request methods.By default, this instrumentation defines "known" methods as the ones listed in RFC9110 and the PATCH method defined in RFC5789.
Note: calling this method overrides the default known method sets completely; it does not supplement it.
- Parameters:
knownMethods- A set of recognized HTTP request methods.- See Also:
-
setSpanNameExtractor
@CanIgnoreReturnValue public SpringWebfluxServerTelemetryBuilder setSpanNameExtractor(Function<io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<org.springframework.web.server.ServerWebExchange>, io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor<org.springframework.web.server.ServerWebExchange>> serverSpanNameExtractor) Sets custom serverSpanNameExtractorvia transform function. -
build
Returns a newSpringWebfluxServerTelemetrywith the settings of thisSpringWebfluxServerTelemetryBuilder.
-