Class PrometheusProtobufWriter
Object
PrometheusProtobufWriter
- All Implemented Interfaces:
ExpositionFormatWriter
Write the Prometheus protobuf format as defined in github.com/prometheus/client_model.
As of today, this is the only exposition format that supports native histograms.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Returns true if the writer is available.toDebugString
(MetricSnapshots metricSnapshots) void
write
(OutputStream out, MetricSnapshots metricSnapshots) Text formats use UTF-8 encoding.
-
Field Details
-
CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
PrometheusProtobufWriter
public PrometheusProtobufWriter()
-
-
Method Details
-
accepts
- Specified by:
accepts
in interfaceExpositionFormatWriter
-
getContentType
- Specified by:
getContentType
in interfaceExpositionFormatWriter
-
isAvailable
Description copied from interface:ExpositionFormatWriter
Returns true if the writer is available. If false, the writer will throw an exception if used.- Specified by:
isAvailable
in interfaceExpositionFormatWriter
-
toDebugString
- Specified by:
toDebugString
in interfaceExpositionFormatWriter
-
write
Description copied from interface:ExpositionFormatWriter
Text formats use UTF-8 encoding.- Specified by:
write
in interfaceExpositionFormatWriter
- Throws:
IOException
-