Class TracingFeature.Builder

java.lang.Object
io.helidon.nima.webserver.tracing.TracingFeature.Builder
All Implemented Interfaces:
Builder<TracingFeature.Builder,TracingFeature>, Supplier<TracingFeature>
Enclosing class:
TracingFeature

public static class TracingFeature.Builder extends Object implements Builder<TracingFeature.Builder,TracingFeature>
A fluent API builder for TracingFeature.
  • Method Details

    • build

      public TracingFeature build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<TracingFeature.Builder,TracingFeature>
      Returns:
      instance of the built type
    • addPathConfig

      public TracingFeature.Builder addPathConfig(PathTracingConfig pathTracingConfig)
      Add a path specific configuration of tracing.
      Parameters:
      pathTracingConfig - configuration of tracing for a specific path
      Returns:
      updated builder instance
    • envConfig

      public TracingFeature.Builder envConfig(TracingConfig tracingConfig)
      Use the provided configuration as a default for any request.
      Parameters:
      tracingConfig - default web server tracing configuration
      Returns:
      updated builder instance
    • config

      public TracingFeature.Builder config(Config config)
      Update builder from Config.
      Parameters:
      config - config to read default configuration and path specific configuration from
      Returns:
      updated builder instance
    • weight

      public TracingFeature.Builder weight(double weight)
      Override default weight of this feature. Changing weight may cause tracing to be executed at a different time (such as after security, or even after all routes). Please understand feature weights before changing this order.
      Parameters:
      weight - new weight of tracing feature
      Returns:
      updated builder
    • enabled

      public TracingFeature.Builder enabled(boolean enabled)
      Explicitly enable/disable tracing feature.
      Parameters:
      enabled - if set to false, this feature will be disabled and tracing filter will never be registered
      Returns:
      updated builder
    • tracer

      public TracingFeature.Builder tracer(Tracer tracer)
      Tracer to use to extract inbound span context.
      Parameters:
      tracer - tracer to use
      Returns:
      updated builder