Class PrometheusProperties.MetricPropertiesMap
java.lang.Object
io.prometheus.metrics.config.PrometheusProperties.MetricPropertiesMap
- Enclosing class:
PrometheusProperties
Map that stores metric-specific properties keyed by metric name in exposition format
(underscores instead of dots).
This wrapper makes it explicit that metric names are normalized to underscore format for storage, so that environment variables and properties with dots in metric names can be correctly looked up using normalized names.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) MetricsPropertiesGet metric properties by metric name.private static String(package private) voidput(String metricName, MetricsProperties properties) (package private) voidset(Map<String, MetricsProperties> properties)
-
Field Details
-
map
-
-
Constructor Details
-
MetricPropertiesMap
MetricPropertiesMap()
-
-
Method Details
-
set
-
put
-
get
Get metric properties by metric name.Accepts metric names in any format (with dots or underscores) and automatically converts them to the normalized underscore format used for storage.
- Parameters:
metricName- the metric name (dots will be converted to underscores)- Returns:
- the metric properties, or null if not configured
-
normalize
-