Module io.helidon.metrics.api
Package io.helidon.metrics.spi
Interface MeterRegistryFormatterProvider
- All Known Implementing Classes:
JsonMeterRegistryFormatterProvider
,MicrometerPrometheusFormatterProvider
public interface MeterRegistryFormatterProvider
Behavior for providers of meter registry formatters, which (if then can) furnish a formatter given a
MediaType
.
We use a provider approach so code can obtain and run formatters that might depend heavily on particular implementations without the calling code having to share that heavy dependency.
-
Method Summary
Modifier and TypeMethodDescriptionformatter
(MediaType mediaType, MetricsConfig metricsConfig, MeterRegistry meterRegistry, Optional<String> scopeTagName, Iterable<String> scopeSelection, Iterable<String> nameSelection) Returns, if possible, aMeterRegistryFormatter
capable of preparing output according to the specifiedMediaType
.
-
Method Details
-
formatter
Optional<MeterRegistryFormatter> formatter(MediaType mediaType, MetricsConfig metricsConfig, MeterRegistry meterRegistry, Optional<String> scopeTagName, Iterable<String> scopeSelection, Iterable<String> nameSelection) Returns, if possible, aMeterRegistryFormatter
capable of preparing output according to the specifiedMediaType
.- Parameters:
mediaType
- media type of the desired outputmetricsConfig
-MetricsConfig
to influence the formattingmeterRegistry
-MeterRegistry
from which to gather datascopeTagName
- tag name used to record scopescopeSelection
- scope names to format; empty means no scope-based restrictionnameSelection
- meter names to format; empty means no name-based restriction- Returns:
- compatible formatter; empty if none
-