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

java.lang.Object
io.helidon.metrics.providers.micrometer.OtlpPublisherConfig.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:
OtlpPublisherConfig.Builder
Enclosing interface:
OtlpPublisherConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(OtlpPublisherConfig 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(OtlpPublisherConfig.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 OtlpPublisherConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OtlpPublisherConfig>
      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 OtlpPublisherConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OtlpPublisherConfig>
      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)
      The prefix for settings.
      Parameters:
      prefix - prefix
      Returns:
      updated builder instance
      See Also:
    • clearUrl

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

      public BUILDER url(String url)
      URL to which to send metrics telemetry.
      Parameters:
      url - backend URL
      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)
      Interval between successive transmissions of metrics data.
      Parameters:
      interval - step interval
      Returns:
      updated builder instance
      See Also:
    • resourceAttributes

      public BUILDER resourceAttributes(Map<String,String> resourceAttributes)
      Attribute name/value pairs to be associated with all metrics transmissions. This method replaces all values with the new ones.
      Parameters:
      resourceAttributes - name/value pairs of attribute settings
      Returns:
      updated builder instance
      See Also:
    • addResourceAttributes

      public BUILDER addResourceAttributes(Map<String,String> resourceAttributes)
      Attribute name/value pairs to be associated with all metrics transmissions. This method keeps existing values, then puts all new values into the map.
      Parameters:
      resourceAttributes - name/value pairs of attribute settings
      Returns:
      updated builder instance
      See Also:
    • clearAggregationTemporality

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

      public BUILDER aggregationTemporality(io.micrometer.registry.otlp.AggregationTemporality aggregationTemporality)
      Algorithm to use for adjusting values before transmission.
      Parameters:
      aggregationTemporality - aggregation strategy
      Returns:
      updated builder instance
      See Also:
    • clearBatchSize

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

      public BUILDER batchSize(int batchSize)
      Number of measurements to send in a single request to the backend.
      Parameters:
      batchSize - transmission batch size
      Returns:
      updated builder instance
      See Also:
    • headers

      public BUILDER headers(Map<String,String> headers)
      Headers to add to each transmission message. This method replaces all values with the new ones.
      Parameters:
      headers - headers
      Returns:
      updated builder instance
      See Also:
    • addHeaders

      public BUILDER addHeaders(Map<String,String> headers)
      Headers to add to each transmission message. This method keeps existing values, then puts all new values into the map.
      Parameters:
      headers - headers
      Returns:
      updated builder instance
      See Also:
    • clearMaxScale

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

      public BUILDER maxScale(int maxScale)
      Maximum scale value to apply to statistical histogram.
      Parameters:
      maxScale - maximum scale
      Returns:
      updated builder instance
      See Also:
    • clearMaxBucketCount

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

      public BUILDER maxBucketCount(int maxBucketCount)
      Maximum bucket count to apply to statistical histogram.
      Parameters:
      maxBucketCount - maximum bucket count
      Returns:
      updated builder instance
      See Also:
    • maxBucketsPerMeter

      public BUILDER maxBucketsPerMeter(Map<String,Integer> maxBucketsPerMeter)
      Maximum number of buckets to use for specific meters. This method replaces all values with the new ones.
      Parameters:
      maxBucketsPerMeter - meter-specific maxBucket values
      Returns:
      updated builder instance
      See Also:
    • addMaxBucketsPerMeter

      public BUILDER addMaxBucketsPerMeter(Map<String,Integer> maxBucketsPerMeter)
      Maximum number of buckets to use for specific meters. This method keeps existing values, then puts all new values into the map.
      Parameters:
      maxBucketsPerMeter - meter-specific maxBucket values
      Returns:
      updated builder instance
      See Also:
    • clearBaseTimeUnit

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

      public BUILDER baseTimeUnit(TimeUnit baseTimeUnit)
      Base time unit for timers.
      Parameters:
      baseTimeUnit - base time unit
      Returns:
      updated builder instance
      See Also:
    • properties

      public BUILDER properties(Map<String,String> properties)
      Property values to be returned by the OTLP meter registry configuration. This method replaces all values with the new ones.
      Parameters:
      properties - properties
      Returns:
      updated builder instance
      See Also:
    • addProperties

      public BUILDER addProperties(Map<String,String> properties)
      Property values to be returned by the OTLP meter registry configuration. This method keeps existing values, then puts all new values into the map.
      Parameters:
      properties - properties
      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()
      The prefix for settings.
      Returns:
      prefix
    • url

      public Optional<String> url()
      URL to which to send metrics telemetry.
      Returns:
      backend URL
    • interval

      public Optional<Duration> interval()
      Interval between successive transmissions of metrics data.
      Returns:
      step interval
    • resourceAttributes

      public Map<String,String> resourceAttributes()
      Attribute name/value pairs to be associated with all metrics transmissions.
      Returns:
      name/value pairs of attribute settings
    • aggregationTemporality

      public Optional<io.micrometer.registry.otlp.AggregationTemporality> aggregationTemporality()
      Algorithm to use for adjusting values before transmission.
      Returns:
      aggregation strategy
    • batchSize

      public Optional<Integer> batchSize()
      Number of measurements to send in a single request to the backend.
      Returns:
      transmission batch size
    • headers

      public Map<String,String> headers()
      Headers to add to each transmission message.
      Returns:
      headers
    • maxScale

      public Optional<Integer> maxScale()
      Maximum scale value to apply to statistical histogram.
      Returns:
      maximum scale
    • maxBucketCount

      public Optional<Integer> maxBucketCount()
      Maximum bucket count to apply to statistical histogram.
      Returns:
      maximum bucket count
    • maxBucketsPerMeter

      public Map<String,Integer> maxBucketsPerMeter()
      Maximum number of buckets to use for specific meters.
      Returns:
      meter-specific maxBucket values
    • baseTimeUnit

      public Optional<TimeUnit> baseTimeUnit()
      Base time unit for timers.
      Returns:
      base time unit
    • config

      public Optional<Config> config()
      Metrics configuration node.
      Returns:
      metrics configuration
    • properties

      public Map<String,String> properties()
      Property values to be returned by the OTLP meter registry configuration.
      Returns:
      properties
    • 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.