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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanReturns true if the writer is available.toDebugString(MetricSnapshots metricSnapshots, EscapingScheme escapingScheme) Converts the metric snapshots to a debug string using the specified escaping scheme.voidwrite(OutputStream out, MetricSnapshots metricSnapshots, EscapingScheme escapingScheme) Writes the given metric snapshots to the output stream using the specified escaping scheme.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExpositionFormatWriter
toDebugString, write
-
Field Details
-
CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
PrometheusProtobufWriter
public PrometheusProtobufWriter()
-
-
Method Details
-
accepts
- Specified by:
acceptsin interfaceExpositionFormatWriter
-
getContentType
- Specified by:
getContentTypein interfaceExpositionFormatWriter
-
isAvailable
Description copied from interface:ExpositionFormatWriterReturns true if the writer is available. If false, the writer will throw an exception if used.- Specified by:
isAvailablein interfaceExpositionFormatWriter
-
toDebugString
Description copied from interface:ExpositionFormatWriterConverts the metric snapshots to a debug string using the specified escaping scheme.- Specified by:
toDebugStringin interfaceExpositionFormatWriter
-
write
public void write(OutputStream out, MetricSnapshots metricSnapshots, EscapingScheme escapingScheme) throws IOException Description copied from interface:ExpositionFormatWriterWrites the given metric snapshots to the output stream using the specified escaping scheme.- Specified by:
writein interfaceExpositionFormatWriter- Throws:
IOException
-