Class MicrometerPrometheusFormatter
java.lang.Object
io.helidon.metrics.providers.micrometer.MicrometerPrometheusFormatter
- All Implemented Interfaces:
MeterRegistryFormatter
Retrieves and prepares meter output from the specified meter registry according to the formats supported by the Prometheus
meter registry.
Because the Prometheus exposition format is flat, and because some meter types have multiple values, the meter names in the output repeat the actual meter name with suffixes to indicate the specific quantities (e.g., count, total, max) each reported value conveys. The active Prometheus naming convention controls how meter and tag names are normalized.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating a tailored Prometheus formatter. -
Field Summary
FieldsModifier and TypeFieldDescriptionMapping from supported media types to the corresponding Prometheus registry content types. -
Method Summary
Modifier and TypeMethodDescriptionbuilder(MeterRegistry meterRegistry) Returns a new builder for constructing a formatter.format()Returns the Prometheus output governed by the previously-specified media type, optionally filtered by the previously-specified tag and meter name selections.Formats the meter registry's metadata.static StringConvert the meter or tag name to the format used by the Prometheus simple client.
-
Field Details
-
MEDIA_TYPE_TO_FORMAT
-
-
Method Details
-
builder
Returns a new builder for constructing a formatter.- Parameters:
meterRegistry- theMeterRegistryfrom which to build the Prometheus output- Returns:
- new builder
-
normalizeNameToPrometheus
-
format
Returns the Prometheus output governed by the previously-specified media type, optionally filtered by the previously-specified tag and meter name selections.- Specified by:
formatin interfaceMeterRegistryFormatter- Returns:
- filtered Prometheus output
-
formatMetadata
Description copied from interface:MeterRegistryFormatterFormats the meter registry's metadata.- Specified by:
formatMetadatain interfaceMeterRegistryFormatter- Returns:
- formatted metadata output
-