Class TracingObserverConfig.BuilderBase<BUILDER extends TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TracingObserverConfig>

java.lang.Object
io.helidon.webserver.observe.ObserverConfigBase.BuilderBase<BUILDER, PROTOTYPE>
io.helidon.webserver.observe.tracing.TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER, PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Direct Known Subclasses:
TracingObserverConfig.Builder
Enclosing interface:
TracingObserverConfig

public abstract static class TracingObserverConfig.BuilderBase<BUILDER extends TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TracingObserverConfig> extends ObserverConfigBase.BuilderBase<BUILDER, PROTOTYPE> implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for TracingObserverConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(TracingObserverConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(TracingObserverConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TracingObserverConfig>
      Overrides:
      config in class ObserverConfigBase.BuilderBase<BUILDER extends TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TracingObserverConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • envConfig

      public BUILDER envConfig(TracingConfig envConfig)
      Use the provided configuration as a default for any request.
      Parameters:
      envConfig - default web server tracing configuration
      Returns:
      updated builder instance
      See Also:
    • envConfig

      public BUILDER envConfig(Consumer<TracingConfig.Builder> consumer)
      Use the provided configuration as a default for any request.
      Parameters:
      consumer - consumer of builder of default web server tracing configuration
      Returns:
      updated builder instance
      See Also:
    • envConfig

      public BUILDER envConfig(Supplier<? extends TracingConfig> supplier)
      Use the provided configuration as a default for any request.
      Parameters:
      supplier - supplier of default web server tracing configuration
      Returns:
      updated builder instance
      See Also:
    • clearPathConfigs

      public BUILDER clearPathConfigs()
      Clear all pathConfigs.
      Returns:
      updated builder instance
      See Also:
    • pathConfigs

      public BUILDER pathConfigs(List<? extends PathTracingConfig> pathConfigs)
      Path specific configuration of tracing.
      Parameters:
      pathConfigs - configuration of tracing for specific paths
      Returns:
      updated builder instance
      See Also:
    • addPathConfigs

      public BUILDER addPathConfigs(List<? extends PathTracingConfig> pathConfigs)
      Path specific configuration of tracing.
      Parameters:
      pathConfigs - configuration of tracing for specific paths
      Returns:
      updated builder instance
      See Also:
    • addPathConfig

      public BUILDER addPathConfig(PathTracingConfig pathConfig)
      Path specific configuration of tracing.
      Parameters:
      pathConfig - add single configuration of tracing for specific paths
      Returns:
      updated builder instance
      See Also:
    • addPathConfig

      public BUILDER addPathConfig(Consumer<PathTracingConfig.Builder> consumer)
      Path specific configuration of tracing.
      Parameters:
      consumer - consumer of builder for configuration of tracing for specific paths
      Returns:
      updated builder instance
      See Also:
    • tracer

      public BUILDER tracer(Tracer tracer)
      Tracer to use to extract inbound span context.
      Parameters:
      tracer - tracer to use
      Returns:
      updated builder instance
      See Also:
    • weight

      public BUILDER weight(double weight)
      Weight of the feature registered with WebServer. 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 - weight of tracing feature
      Returns:
      updated builder instance
      See Also:
    • clearSockets

      public BUILDER clearSockets()
      Clear all sockets.
      Returns:
      updated builder instance
      See Also:
    • sockets

      public BUILDER sockets(Set<String> sockets)
      Sockets to trace.

      If empty, all sockets will be traced. The default socket without any tag, additional sockets with a tag with the socket name.

      Parameters:
      sockets - set of sockets to trace
      Returns:
      updated builder instance
      See Also:
    • addSockets

      public BUILDER addSockets(Set<String> sockets)
      Sockets to trace.

      If empty, all sockets will be traced. The default socket without any tag, additional sockets with a tag with the socket name.

      Parameters:
      sockets - set of sockets to trace
      Returns:
      updated builder instance
      See Also:
    • addSocket

      public BUILDER addSocket(String socket)
      Sockets to trace.

      If empty, all sockets will be traced. The default socket without any tag, additional sockets with a tag with the socket name.

      Parameters:
      socket - add single set of sockets to trace
      Returns:
      updated builder instance
      See Also:
    • waitTracingEnabled

      public BUILDER waitTracingEnabled(boolean waitTracingEnabled)
      Whether waiting due to concurrency limit constraints should be traced.
      Parameters:
      waitTracingEnabled - true if wait-time spans should be created; false otherwise
      Returns:
      updated builder instance
      See Also:
    • envConfig

      public TracingConfig envConfig()
      Use the provided configuration as a default for any request.
      Returns:
      default web server tracing configuration
    • pathConfigs

      public List<PathTracingConfig> pathConfigs()
      Path specific configuration of tracing.
      Returns:
      configuration of tracing for specific paths
    • tracer

      public Optional<Tracer> tracer()
      Tracer to use to extract inbound span context.
      Returns:
      tracer to use
    • weight

      public double weight()
      Weight of the feature registered with WebServer. 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.
      Returns:
      weight of tracing feature
    • sockets

      public Set<String> sockets()
      Sockets to trace.

      If empty, all sockets will be traced. The default socket without any tag, additional sockets with a tag with the socket name.

      Returns:
      set of sockets to trace
    • waitTracingEnabled

      public boolean waitTracingEnabled()
      Whether waiting due to concurrency limit constraints should be traced.
      Returns:
      true if wait-time spans should be created; false otherwise
    • toString

    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
      Overrides:
      preBuildPrototype in class ObserverConfigBase.BuilderBase<BUILDER extends TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TracingObserverConfig>
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
      Overrides:
      validatePrototype in class ObserverConfigBase.BuilderBase<BUILDER extends TracingObserverConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TracingObserverConfig>