Module io.prometheus.writer.text
Interface ExpositionFormatWriter
- All Known Implementing Classes:
OpenMetricsTextFormatWriter,PrometheusProtobufWriter,PrometheusTextFormatWriter
public interface ExpositionFormatWriter
-
Method Summary
Modifier and TypeMethodDescriptionbooleandefault booleanReturns true if the writer is available.default StringtoDebugString(io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots) Converts the metric snapshots to a debug string using the default escaping scheme.default StringtoDebugString(io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots, io.prometheus.metrics.config.EscapingScheme escapingScheme) Converts the metric snapshots to a debug string using the specified escaping scheme.default voidwrite(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots) Writes the given metric snapshots to the output stream using the default escaping scheme.voidwrite(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots, io.prometheus.metrics.config.EscapingScheme escapingScheme) Writes the given metric snapshots to the output stream using the specified escaping scheme.
-
Method Details
-
accepts
-
write
void write(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots, io.prometheus.metrics.config.EscapingScheme escapingScheme) throws IOException Writes the given metric snapshots to the output stream using the specified escaping scheme.- Throws:
IOException
-
write
default void write(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots) throws IOException Writes the given metric snapshots to the output stream using the default escaping scheme.- Throws:
IOException
-
toDebugString
default String toDebugString(io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots, io.prometheus.metrics.config.EscapingScheme escapingScheme) Converts the metric snapshots to a debug string using the specified escaping scheme. -
toDebugString
Converts the metric snapshots to a debug string using the default escaping scheme. -
getContentType
String getContentType() -
isAvailable
default boolean isAvailable()Returns true if the writer is available. If false, the writer will throw an exception if used.
-