Package io.prometheus.metrics.config
Class MetricsProperties
java.lang.Object
io.prometheus.metrics.config.MetricsProperties
Properties starting with io.prometheus.metrics
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final Booleanprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final Booleanprivate final Integerprivate final Integerprivate final Doubleprivate final Doubleprivate final Booleanprivate final Long(package private) static final String[]All known property suffixes that can be configured for metrics.private static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final Longprivate final Integer -
Constructor Summary
ConstructorsModifierConstructorDescriptionMetricsProperties(Boolean exemplarsEnabled, Boolean histogramNativeOnly, Boolean histogramClassicOnly, List<Double> histogramClassicUpperBounds, Integer histogramNativeInitialSchema, Double histogramNativeMinZeroThreshold, Double histogramNativeMaxZeroThreshold, Integer histogramNativeMaxNumberOfBuckets, Long histogramNativeResetDurationSeconds, List<Double> summaryQuantiles, List<Double> summaryQuantileErrors, Long summaryMaxAgeSeconds, Integer summaryNumberOfAgeBuckets) privateMetricsProperties(Boolean exemplarsEnabled, Boolean histogramNativeOnly, Boolean histogramClassicOnly, List<Double> histogramClassicUpperBounds, Integer histogramNativeInitialSchema, Double histogramNativeMinZeroThreshold, Double histogramNativeMaxZeroThreshold, Integer histogramNativeMaxNumberOfBuckets, Long histogramNativeResetDurationSeconds, List<Double> summaryQuantiles, List<Double> summaryQuantileErrors, Long summaryMaxAgeSeconds, Integer summaryNumberOfAgeBuckets, String configPropertyPrefix) -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricsProperties.Builderbuilder()This is the only configuration property that can be applied to all metric types.SeeHistogram.Builder.classicOnly()SeeHistogram.Builder.classicUpperBounds()SeeHistogram.Builder.nativeInitialSchema()SeeHistogram.Builder.nativeMaxNumberOfBuckets()SeeHistogram.Builder.nativeMaxZeroThreshold()SeeHistogram.Builder.nativeMinZeroThreshold()SeeHistogram.Builder.nativeOnly()SeeHistogram.Builder.nativeResetDuration()SeeSummary.Builder.maxAgeSeconds()SeeSummary.Builder.numberOfAgeBuckets()SeeSummary.Builder.quantile()SeeSummary.Builder.quantile()private BooleanisHistogramClassicOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) private BooleanisHistogramNativeOnly(Boolean histogramClassicOnly, Boolean histogramNativeOnly) (package private) static MetricsPropertiesload(String prefix, PropertySource propertySource) Note that this will remove entries frompropertySource.private void
-
Field Details
-
EXEMPLARS_ENABLED
- See Also:
-
HISTOGRAM_NATIVE_ONLY
- See Also:
-
HISTOGRAM_CLASSIC_ONLY
- See Also:
-
HISTOGRAM_CLASSIC_UPPER_BOUNDS
- See Also:
-
HISTOGRAM_NATIVE_INITIAL_SCHEMA
- See Also:
-
HISTOGRAM_NATIVE_MIN_ZERO_THRESHOLD
- See Also:
-
HISTOGRAM_NATIVE_MAX_ZERO_THRESHOLD
- See Also:
-
HISTOGRAM_NATIVE_MAX_NUMBER_OF_BUCKETS
- See Also:
-
HISTOGRAM_NATIVE_RESET_DURATION_SECONDS
- See Also:
-
SUMMARY_QUANTILES
- See Also:
-
SUMMARY_QUANTILE_ERRORS
- See Also:
-
SUMMARY_MAX_AGE_SECONDS
- See Also:
-
SUMMARY_NUMBER_OF_AGE_BUCKETS
- See Also:
-
PROPERTY_SUFFIXES
All known property suffixes that can be configured for metrics.This list is used to parse metric-specific configuration keys from environment variables.
-
exemplarsEnabled
-
histogramNativeOnly
-
histogramClassicOnly
-
histogramClassicUpperBounds
-
histogramNativeInitialSchema
-
histogramNativeMinZeroThreshold
-
histogramNativeMaxZeroThreshold
-
histogramNativeMaxNumberOfBuckets
-
histogramNativeResetDurationSeconds
-
summaryQuantiles
-
summaryQuantileErrors
-
summaryMaxAgeSeconds
-
summaryNumberOfAgeBuckets
-
-
Constructor Details
-
MetricsProperties
public MetricsProperties(Boolean exemplarsEnabled, Boolean histogramNativeOnly, Boolean histogramClassicOnly, List<Double> histogramClassicUpperBounds, Integer histogramNativeInitialSchema, Double histogramNativeMinZeroThreshold, Double histogramNativeMaxZeroThreshold, Integer histogramNativeMaxNumberOfBuckets, Long histogramNativeResetDurationSeconds, List<Double> summaryQuantiles, List<Double> summaryQuantileErrors, Long summaryMaxAgeSeconds, Integer summaryNumberOfAgeBuckets) -
MetricsProperties
private MetricsProperties(Boolean exemplarsEnabled, Boolean histogramNativeOnly, Boolean histogramClassicOnly, List<Double> histogramClassicUpperBounds, Integer histogramNativeInitialSchema, Double histogramNativeMinZeroThreshold, Double histogramNativeMaxZeroThreshold, Integer histogramNativeMaxNumberOfBuckets, Long histogramNativeResetDurationSeconds, List<Double> summaryQuantiles, List<Double> summaryQuantileErrors, Long summaryMaxAgeSeconds, Integer summaryNumberOfAgeBuckets, String configPropertyPrefix)
-
-
Method Details
-
isHistogramClassicOnly
-
isHistogramNativeOnly
-
validate
- Throws:
PrometheusPropertiesException
-
getExemplarsEnabled
This is the only configuration property that can be applied to all metric types. You can use it to turn Exemplar support off. Default istrue. -
getHistogramNativeOnly
SeeHistogram.Builder.nativeOnly() -
getHistogramClassicOnly
SeeHistogram.Builder.classicOnly() -
getHistogramClassicUpperBounds
SeeHistogram.Builder.classicUpperBounds() -
getHistogramNativeInitialSchema
SeeHistogram.Builder.nativeInitialSchema() -
getHistogramNativeMinZeroThreshold
SeeHistogram.Builder.nativeMinZeroThreshold() -
getHistogramNativeMaxZeroThreshold
SeeHistogram.Builder.nativeMaxZeroThreshold() -
getHistogramNativeMaxNumberOfBuckets
SeeHistogram.Builder.nativeMaxNumberOfBuckets() -
getHistogramNativeResetDurationSeconds
SeeHistogram.Builder.nativeResetDuration() -
getSummaryQuantiles
SeeSummary.Builder.quantile() -
getSummaryQuantileErrors
SeeSummary.Builder.quantile()Returns
nullonly ifgetSummaryQuantiles()is alsonull. Returns an empty list ifgetSummaryQuantiles()are specified without specifying errors. If the list is not empty, it has the same size asgetSummaryQuantiles(). -
getSummaryMaxAgeSeconds
SeeSummary.Builder.maxAgeSeconds() -
getSummaryNumberOfAgeBuckets
SeeSummary.Builder.numberOfAgeBuckets() -
load
static MetricsProperties load(String prefix, PropertySource propertySource) throws PrometheusPropertiesException Note that this will remove entries frompropertySource. This is because we want to know if there are unused properties remaining after all properties have been loaded.- Throws:
PrometheusPropertiesException
-
builder
-