Class OpenMetricsTextFormatWriter
Object
OpenMetricsTextFormatWriter
- All Implemented Interfaces:
ExpositionFormatWriter
Write the OpenMetrics text format as defined on https://openmetrics.io.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionOpenMetricsTextFormatWriter
(boolean createdTimestampsEnabled, boolean exemplarsOnAllMetricTypesEnabled) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
write
(OutputStream out, MetricSnapshots metricSnapshots) Text formats use UTF-8 encoding.
-
Field Details
-
CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
OpenMetricsTextFormatWriter
public OpenMetricsTextFormatWriter(boolean createdTimestampsEnabled, boolean exemplarsOnAllMetricTypesEnabled) - Parameters:
createdTimestampsEnabled
- defines if_created
timestamps should be included in the output or not.
-
-
Method Details
-
accepts
- Specified by:
accepts
in interfaceExpositionFormatWriter
-
getContentType
- Specified by:
getContentType
in interfaceExpositionFormatWriter
-
write
Description copied from interface:ExpositionFormatWriter
Text formats use UTF-8 encoding.- Specified by:
write
in interfaceExpositionFormatWriter
- Throws:
IOException
-