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

java.lang.Object
io.helidon.metrics.providers.micrometer.PrometheusPublisherConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
PrometheusPublisherConfig.Builder
Enclosing interface:
PrometheusPublisherConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(PrometheusPublisherConfig 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(PrometheusPublisherConfig.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

      @Deprecated 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 PrometheusPublisherConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends PrometheusPublisherConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      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 PrometheusPublisherConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends PrometheusPublisherConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      Whether the configured publisher is enabled.
      Parameters:
      enabled - true if enabled, false otherwise
      Returns:
      updated builder instance
      See Also:
    • clearPrefix

      public BUILDER clearPrefix()
      Clear existing value of prefix.
      Returns:
      updated builder instance
      See Also:
    • prefix

      public BUILDER prefix(String prefix)
      Property name prefix.
      Parameters:
      prefix - property name prefix
      Returns:
      updated builder instance
      See Also:
    • clearDescriptions

      public BUILDER clearDescriptions()
      Clear existing value of descriptions.
      Returns:
      updated builder instance
      See Also:
    • descriptions

      public BUILDER descriptions(boolean descriptions)
      Whether to include meter descriptions in Prometheus output.
      Parameters:
      descriptions - true to include descriptions, false otherwise
      Returns:
      updated builder instance
      See Also:
    • clearInterval

      public BUILDER clearInterval()
      Clear existing value of interval.
      Returns:
      updated builder instance
      See Also:
    • interval

      public BUILDER interval(Duration interval)
      Step size used in computing "windowed" statistics. Micrometer advises that this value should be close to the interval with which backend systems scrape the Prometheus-format metrics data.
      Parameters:
      interval - step time
      Returns:
      updated builder instance
      See Also:
    • clearName

      public BUILDER clearName()
      Clear existing value of name.
      Returns:
      updated builder instance
      See Also:
    • name

      public BUILDER name(String name)
      Name option. Defined in MetricsPublisherConfig.name()
      Parameters:
      name - the name option
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      Whether the configured publisher is enabled.
      Returns:
      true if enabled, false otherwise
    • prefix

      public Optional<String> prefix()
      Property name prefix.
      Returns:
      property name prefix
    • descriptions

      public Optional<Boolean> descriptions()
      Whether to include meter descriptions in Prometheus output.
      Returns:
      true to include descriptions, false otherwise
    • interval

      public Optional<Duration> interval()
      Step size used in computing "windowed" statistics. Micrometer advises that this value should be close to the interval with which backend systems scrape the Prometheus-format metrics data.
      Returns:
      step time
    • name

      public Optional<String> name()
      Name option. Defined in MetricsPublisherConfig.name()
      Returns:
      the name option
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance