Class PrometheusProperties
Object
PrometheusProperties
The Prometheus Java client library can be configured at runtime (e.g. using a properties file).
This class represents the runtime configuration.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PrometheusProperties.Builderbuilder()static PrometheusPropertiesget()Get the properties instance.The default metric properties apply for metrics wheregetMetricProperties(String)isnull.getMetricProperties(String metricName) Properties specific for one metric.
-
Method Details
-
get
Get the properties instance. When called for the first time,get()loads the properties from the following locations:prometheus.propertiesfile found in the classpath.- Properties file specified in the
PROMETHEUS_CONFIGenvironment variable or theprometheus.configsystem property. - Individual properties from system properties.
- Throws:
PrometheusPropertiesException
-
builder
-
getDefaultMetricProperties
The default metric properties apply for metrics wheregetMetricProperties(String)isnull. -
getMetricProperties
Properties specific for one metric. Should be merged withgetDefaultMetricProperties(). May returnnullif no metric-specific properties are configured for a metric name.- Parameters:
metricName- the metric name (dots will be automatically converted to underscores to match exposition format)
-
getExemplarProperties
-
getExporterProperties
-
getExporterFilterProperties
-
getExporterHttpServerProperties
-
getExporterPushgatewayProperties
-
getExporterOpenTelemetryProperties
-