Class PrometheusTextFormatWriter
java.lang.Object
io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter
- All Implemented Interfaces:
ExpositionFormatWriter
Write the Prometheus text format. This is the default if you view a Prometheus endpoint with your
Web browser.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidwrite(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots) Text formats use UTF-8 encoding.voidwriteCreated(OutputStreamWriter writer, io.prometheus.metrics.model.snapshots.MetricSnapshot snapshot)
-
Field Details
-
CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
PrometheusTextFormatWriter
public PrometheusTextFormatWriter(boolean writeCreatedTimestamps)
-
-
Method Details
-
accepts
- Specified by:
acceptsin interfaceExpositionFormatWriter
-
getContentType
- Specified by:
getContentTypein interfaceExpositionFormatWriter
-
write
public void write(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots) throws IOException Description copied from interface:ExpositionFormatWriterText formats use UTF-8 encoding.- Specified by:
writein interfaceExpositionFormatWriter- Throws:
IOException
-
writeCreated
public void writeCreated(OutputStreamWriter writer, io.prometheus.metrics.model.snapshots.MetricSnapshot snapshot) throws IOException - Throws:
IOException
-