Class SpringWebfluxTelemetryClientBuilder

java.lang.Object
io.opentelemetry.instrumentation.spring.webflux.v5_3.internal.SpringWebfluxTelemetryClientBuilder

public final class SpringWebfluxTelemetryClientBuilder extends Object
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Constructor Details

    • SpringWebfluxTelemetryClientBuilder

      public SpringWebfluxTelemetryClientBuilder(io.opentelemetry.api.OpenTelemetry openTelemetry)
  • Method Details

    • addClientAttributesExtractor

      @CanIgnoreReturnValue public SpringWebfluxTelemetryClientBuilder addClientAttributesExtractor(io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<org.springframework.web.reactive.function.client.ClientRequest,org.springframework.web.reactive.function.client.ClientResponse> attributesExtractor)
      Adds an additional AttributesExtractor to invoke to set attributes to instrumented items for WebClient.
    • setCapturedClientRequestHeaders

      @CanIgnoreReturnValue public SpringWebfluxTelemetryClientBuilder 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 SpringWebfluxTelemetryClientBuilder 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 SpringWebfluxTelemetryClientBuilder 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.
    • build

      public io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<org.springframework.web.reactive.function.client.ClientRequest,org.springframework.web.reactive.function.client.ClientResponse> build()
      Returns a new SpringWebfluxTelemetry with the settings of this SpringWebfluxTelemetryClientBuilder.