Package io.prometheus.metrics.config
Class PrometheusProperties
java.lang.Object
io.prometheus.metrics.config.PrometheusProperties
The Prometheus Java client library can be configured at runtime (e.g. using a properties file).
This class represents the runtime configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionPrometheusProperties(MetricsProperties defaultMetricsProperties, Map<String, MetricsProperties> metricProperties, ExemplarsProperties exemplarProperties, ExporterProperties exporterProperties, ExporterFilterProperties exporterFilterProperties, ExporterHttpServerProperties httpServerConfig) -
Method Summary
Modifier and TypeMethodDescriptionstatic PrometheusPropertiesget()Get the properties instance.The default metric properties apply for metrics wheregetMetricProperties(String)isnull.getMetricProperties(String metricName) Properties specific for one metric.
-
Constructor Details
-
PrometheusProperties
public PrometheusProperties(MetricsProperties defaultMetricsProperties, Map<String, MetricsProperties> metricProperties, ExemplarsProperties exemplarProperties, ExporterProperties exporterProperties, ExporterFilterProperties exporterFilterProperties, ExporterHttpServerProperties httpServerConfig)
-
-
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
-
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. -
getExemplarProperties
-
getExporterProperties
-
getExporterFilterProperties
-
getExporterHttpServerProperties
-