Package io.prometheus.metrics.config
Class OpenMetrics2Properties
java.lang.Object
io.prometheus.metrics.config.OpenMetrics2Properties
Properties starting with io.prometheus.openmetrics2. These properties are experimental and
subject to change.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final Booleanprivate static final Stringprivate final Booleanprivate final Booleanprivate static final Stringprivate static final Stringprivate final Booleanprivate static final Stringprivate final Booleanprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanSingle-line histogram/summary withst@.booleanGate OM2 features behind content negotiation.booleanEnable the OpenMetrics 2.0 text format writer.booleanMandatory timestamps, no 128-char limit for exemplars.booleanExponential buckets support for native histograms.(package private) static OpenMetrics2Propertiesload(PropertySource propertySource) Note that this will remove entries frompropertySource.
-
Field Details
-
PREFIX
- See Also:
-
ENABLED
- See Also:
-
CONTENT_NEGOTIATION
- See Also:
-
COMPOSITE_VALUES
- See Also:
-
EXEMPLAR_COMPLIANCE
- See Also:
-
NATIVE_HISTOGRAMS
- See Also:
-
enabled
-
contentNegotiation
-
compositeValues
-
exemplarCompliance
-
nativeHistograms
-
-
Constructor Details
-
OpenMetrics2Properties
-
-
Method Details
-
getEnabled
public boolean getEnabled()Enable the OpenMetrics 2.0 text format writer. Whentrue, the OM2 writer is used instead of OM1 for OpenMetrics responses. Default isfalse. -
getContentNegotiation
public boolean getContentNegotiation()Gate OM2 features behind content negotiation. Default isfalse. -
getCompositeValues
public boolean getCompositeValues()Single-line histogram/summary withst@. Default isfalse. -
getExemplarCompliance
public boolean getExemplarCompliance()Mandatory timestamps, no 128-char limit for exemplars. Default isfalse. -
getNativeHistograms
public boolean getNativeHistograms()Exponential buckets support for native histograms. Default isfalse. -
load
static OpenMetrics2Properties load(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
-