Class ExemplarSamplerConfig

Object
ExemplarSamplerConfig

public class ExemplarSamplerConfig extends Object
  • Field Details

  • Constructor Details

    • ExemplarSamplerConfig

      public ExemplarSamplerConfig(ExemplarsProperties properties, int numberOfExemplars)
      Constructor for all metric types except classic histograms.
      Parameters:
      properties - See PrometheusProperties.getExemplarProperties().
      numberOfExemplars - Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default. For classic histogram use ExemplarSamplerConfig(ExemplarsProperties, double[]).
    • ExemplarSamplerConfig

      public ExemplarSamplerConfig(ExemplarsProperties properties, double[] histogramClassicUpperBounds)
      Constructor for classic histogram metrics.
      Parameters:
      properties - See PrometheusProperties.getExemplarProperties().
      histogramClassicUpperBounds - the ExemplarSampler will provide one Exemplar per histogram bucket. Must be sorted, and must include the +Inf bucket.
  • Method Details

    • getHistogramClassicUpperBounds

      public double[] getHistogramClassicUpperBounds()
      May be null.
    • getMinRetentionPeriodMillis

      See ExemplarsProperties.getMinRetentionPeriodSeconds()
    • getMaxRetentionPeriodMillis

      See ExemplarsProperties.getMaxRetentionPeriodSeconds()
    • getSampleIntervalMillis

      public long getSampleIntervalMillis()
      See ExemplarsProperties.getSampleIntervalMilliseconds()
    • getNumberOfExemplars

      public int getNumberOfExemplars()
      Defaults: Counters have one Exemplar, native histograms and summaries have 4 Exemplars, classic histograms have one Exemplar per bucket.