Module io.prometheus.metrics.core
Class ExemplarSamplerConfig
java.lang.Object
io.prometheus.metrics.core.exemplars.ExemplarSamplerConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSeeExemplarsProperties.getMaxRetentionPeriodSeconds()static final intSeeExemplarsProperties.getMinRetentionPeriodSeconds() -
Constructor Summary
ConstructorsConstructorDescriptionExemplarSamplerConfig(io.prometheus.metrics.config.ExemplarsProperties properties, double[] histogramClassicUpperBounds) Constructor for classic histogram metrics.ExemplarSamplerConfig(io.prometheus.metrics.config.ExemplarsProperties properties, int numberOfExemplars) Constructor for all metric types except classic histograms. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]May benull.longSeeExemplarsProperties.getMaxRetentionPeriodSeconds()longSeeExemplarsProperties.getMinRetentionPeriodSeconds()intDefaults: Counters have one Exemplar, native histograms and summaries have 4 Exemplars, classic histograms have one Exemplar per bucket.longSeeExemplarsProperties.getSampleIntervalMilliseconds()
-
Field Details
-
DEFAULT_MIN_RETENTION_PERIOD_SECONDS
public static final int DEFAULT_MIN_RETENTION_PERIOD_SECONDSSeeExemplarsProperties.getMinRetentionPeriodSeconds()- See Also:
-
DEFAULT_MAX_RETENTION_PERIOD_SECONDS
public static final int DEFAULT_MAX_RETENTION_PERIOD_SECONDSSeeExemplarsProperties.getMaxRetentionPeriodSeconds()- See Also:
-
-
Constructor Details
-
ExemplarSamplerConfig
public ExemplarSamplerConfig(io.prometheus.metrics.config.ExemplarsProperties properties, int numberOfExemplars) Constructor for all metric types except classic histograms.- Parameters:
properties- SeePrometheusProperties.getExemplarProperties().numberOfExemplars- Counters have 1 Exemplar, native histograms and summaries have 4 Exemplars by default. For classic histogram useExemplarSamplerConfig(ExemplarsProperties, double[]).
-
ExemplarSamplerConfig
public ExemplarSamplerConfig(io.prometheus.metrics.config.ExemplarsProperties properties, double[] histogramClassicUpperBounds) Constructor for classic histogram metrics.- Parameters:
properties- SeePrometheusProperties.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 benull. -
getMinRetentionPeriodMillis
public long getMinRetentionPeriodMillis()SeeExemplarsProperties.getMinRetentionPeriodSeconds() -
getMaxRetentionPeriodMillis
public long getMaxRetentionPeriodMillis()SeeExemplarsProperties.getMaxRetentionPeriodSeconds() -
getSampleIntervalMillis
public long getSampleIntervalMillis()SeeExemplarsProperties.getSampleIntervalMilliseconds() -
getNumberOfExemplars
public int getNumberOfExemplars()Defaults: Counters have one Exemplar, native histograms and summaries have 4 Exemplars, classic histograms have one Exemplar per bucket.
-