Class ExemplarsProperties

java.lang.Object
io.prometheus.metrics.config.ExemplarsProperties

public class ExemplarsProperties extends Object
Properties starting with io.prometheus.exemplars
  • Field Details

    • PREFIX

      private static final String PREFIX
      See Also:
    • MIN_RETENTION_PERIOD_SECONDS

      private static final String MIN_RETENTION_PERIOD_SECONDS
      See Also:
    • MAX_RETENTION_PERIOD_SECONDS

      private static final String MAX_RETENTION_PERIOD_SECONDS
      See Also:
    • SAMPLE_INTERVAL_MILLISECONDS

      private static final String SAMPLE_INTERVAL_MILLISECONDS
      See Also:
    • minRetentionPeriodSeconds

      private final Integer minRetentionPeriodSeconds
    • maxRetentionPeriodSeconds

      private final Integer maxRetentionPeriodSeconds
    • sampleIntervalMilliseconds

      private final Integer sampleIntervalMilliseconds
  • Constructor Details

    • ExemplarsProperties

      private ExemplarsProperties(Integer minRetentionPeriodSeconds, Integer maxRetentionPeriodSeconds, Integer sampleIntervalMilliseconds)
  • Method Details

    • getMinRetentionPeriodSeconds

      public Integer getMinRetentionPeriodSeconds()
      Minimum time how long Exemplars are kept before they may be replaced by new Exemplars.

      Default see ExemplarSamplerConfig.DEFAULT_MIN_RETENTION_PERIOD_SECONDS

    • getMaxRetentionPeriodSeconds

      public Integer getMaxRetentionPeriodSeconds()
      Maximum time how long Exemplars are kept before they are evicted.

      Default see ExemplarSamplerConfig.DEFAULT_MAX_RETENTION_PERIOD_SECONDS

    • getSampleIntervalMilliseconds

      public Integer getSampleIntervalMilliseconds()
      Time between attempts to sample new Exemplars. This is a performance improvement for high-frequency applications, because with the sample interval we make sure that the exemplar sampler is not called for every single request.

      Default see ExemplarSamplerConfig.DEFAULT_SAMPLE_INTERVAL_MILLISECONDS

    • load

      Note that this will remove entries from propertySource. This is because we want to know if there are unused properties remaining after all properties have been loaded.
      Throws:
      PrometheusPropertiesException
    • builder

      public static ExemplarsProperties.Builder builder()