Class JsonMeterRegistryFormatterProvider
java.lang.Object
io.helidon.webserver.observe.metrics.JsonMeterRegistryFormatterProvider
- All Implemented Interfaces:
MeterRegistryFormatterProvider
public class JsonMeterRegistryFormatterProvider
extends Object
implements MeterRegistryFormatterProvider
JSON formatter provider.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance for service loading. -
Method Summary
Modifier and TypeMethodDescriptionformatter(MediaType mediaType, MetricsConfig metricsConfig, MeterRegistry meterRegistry, Map<String, Collection<String>> tagSelection, Iterable<String> nameSelection) Returns, if possible, aMeterRegistryFormattercapable of preparing output according to the specifiedMediaTypeand selections.formatter(MediaType mediaType, MetricsConfig metricsConfig, MeterRegistry meterRegistry, Optional<String> scopeTagName, Iterable<String> scopeSelection, Iterable<String> nameSelection) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
JsonMeterRegistryFormatterProvider
public JsonMeterRegistryFormatterProvider()Creates a new instance for service loading.
-
-
Method Details
-
formatter
public Optional<MeterRegistryFormatter> formatter(MediaType mediaType, MetricsConfig metricsConfig, MeterRegistry meterRegistry, Map<String, Collection<String>> tagSelection, Iterable<String> nameSelection) Description copied from interface:MeterRegistryFormatterProviderReturns, if possible, aMeterRegistryFormattercapable of preparing output according to the specifiedMediaTypeand selections.- Specified by:
formatterin interfaceMeterRegistryFormatterProvider- Parameters:
mediaType- media type of the desired outputmetricsConfig-MetricsConfigto influence the formattingmeterRegistry-MeterRegistryfrom which to gather datatagSelection- tag names and accepted values to format; empty means no tag-based restrictionnameSelection- meter names to format; empty means no name-based restriction- Returns:
- compatible formatter; empty if none
-
formatter
@Deprecated(since="27.0.0", forRemoval=true) public Optional<MeterRegistryFormatter> formatter(MediaType mediaType, MetricsConfig metricsConfig, MeterRegistry meterRegistry, Optional<String> scopeTagName, Iterable<String> scopeSelection, Iterable<String> nameSelection) Deprecated, for removal: This API element is subject to removal in a future version.Useformatter(MediaType, MetricsConfig, MeterRegistry, Map, Iterable). Scope-specific arguments are ignored and this method will be removed.Returns a formatter, if possible, ignoring the scope-specific arguments.- Specified by:
formatterin interfaceMeterRegistryFormatterProvider- Parameters:
mediaType- media type of the desired outputmetricsConfig- metrics configurationmeterRegistry- meter registry from which to gather datascopeTagName- ignored; must not benullscopeSelection- ignored; must not benullnameSelection- meter names to format; empty means no name-based restriction- Returns:
- compatible formatter; empty if none
-
formatter(MediaType, MetricsConfig, MeterRegistry, Map, Iterable).