Interface RegistrySettings.Builder

All Superinterfaces:
Builder<RegistrySettings.Builder,RegistrySettings>, Supplier<RegistrySettings>
Enclosing interface:
RegistrySettings

public static interface RegistrySettings.Builder extends Builder<RegistrySettings.Builder,RegistrySettings>
Builder for RegistrySettings.
  • Field Details

    • ENABLED_CONFIG_KEY

      static final String ENABLED_CONFIG_KEY
      Config key within the registry's config section controlling whether the current type of metrics should be enabled.
      See Also:
    • FILTER_CONFIG_KEY

      static final String FILTER_CONFIG_KEY
      Config key within the registry's config section specifying a filter.
      See Also:
    • TYPE_CONFIG_KEY

      static final String TYPE_CONFIG_KEY
      Config key within the registry's config section identifying which registry type the settings apply to.
      See Also:
  • Method Details

    • enabled

      RegistrySettings.Builder enabled(boolean value)
      Sets whether the metric type should be enabled.
      Parameters:
      value - true if metric type should be enabled; false otherwise
      Returns:
      updated builder
    • filterSettings

      RegistrySettings.Builder filterSettings(RegistryFilterSettings.Builder registryFilterSettingsBuilder)
      Sets the filter to use for identifying specific metrics to enable.
      Parameters:
      registryFilterSettingsBuilder - String specifying enabled and disabled metric name patterns
      Returns:
      updated builder
    • strictExemplars

      RegistrySettings.Builder strictExemplars(boolean value)
      Whether to add exemplars (if exemplar providers are present) only to counter totals and buckets.

      By default, Helidon adds exemplars only to those metric types described as accepting exemplars in the OpenMetrics spec. Helidon can add exemplars to additional metric types but only if the user sets strcitExamplars to @{code false}.

      Parameters:
      value - true/false
      Returns:
      updated builder
    • config

      RegistrySettings.Builder config(Config registrySettings)
      Sets values in the builder based on the provided Config node.
      Parameters:
      registrySettings - Config node containing settings for the registry type
      Returns:
      updated builder
    • isEnabled

      boolean isEnabled()
      Returns:
      builder's current setting for whether metrics in the relevant registry are to be used
    • isStrictExemplars

      boolean isStrictExemplars()
      Returns:
      whether strict exemplar behavior is enabled
    • build

      Creates a new RegistrySettings instance from the builder.
      Specified by:
      build in interface Builder<RegistrySettings.Builder,RegistrySettings>
      Returns:
      new instance from the builder