io.prometheus.metrics.config.ExporterProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmx_prometheus_httpserver Show documentation
Show all versions of jmx_prometheus_httpserver Show documentation
See https://github.com/prometheus/jmx_exporter/blob/master/README.md
package io.prometheus.metrics.config;
import java.util.Map;
/**
* Properties starting with io.prometheus.exporter
*/
public class ExporterProperties {
private static final String INCLUDE_CREATED_TIMESTAMPS = "includeCreatedTimestamps";
private static final String EXEMPLARS_ON_ALL_METRIC_TYPES = "exemplarsOnAllMetricTypes";
private final Boolean includeCreatedTimestamps;
private final Boolean exemplarsOnAllMetricTypes;
private ExporterProperties(Boolean includeCreatedTimestamps, Boolean exemplarsOnAllMetricTypes) {
this.includeCreatedTimestamps = includeCreatedTimestamps;
this.exemplarsOnAllMetricTypes = exemplarsOnAllMetricTypes;
}
/**
* Include the {@code _created} timestamps in text format? Default is {@code false}.
*/
public boolean getIncludeCreatedTimestamps() {
return includeCreatedTimestamps != null && includeCreatedTimestamps;
}
/**
* Allow Exemplars on all metric types in OpenMetrics format?
* Default is {@code false}, which means Exemplars will only be added for Counters and Histogram buckets.
*/
public boolean getExemplarsOnAllMetricTypes() {
return exemplarsOnAllMetricTypes != null && exemplarsOnAllMetricTypes;
}
/**
* Note that this will remove entries from {@code properties}.
* This is because we want to know if there are unused properties remaining after all properties have been loaded.
*/
static ExporterProperties load(String prefix, Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy