Interface ExpositionFormatWriter

All Known Implementing Classes:
OpenMetrics2TextFormatWriter, OpenMetricsTextFormatWriter, PrometheusProtobufWriter, PrometheusTextFormatWriter

public interface ExpositionFormatWriter
  • Method Details

    • accepts

      boolean accepts(String acceptHeader)
    • write

      void write(OutputStream out, MetricSnapshots metricSnapshots, 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, MetricSnapshots metricSnapshots) throws IOException
      Writes the given metric snapshots to the output stream using the default escaping scheme.
      Throws:
      IOException
    • toDebugString

      default String toDebugString(MetricSnapshots metricSnapshots, EscapingScheme escapingScheme)
      Converts the metric snapshots to a debug string using the specified escaping scheme.
    • toDebugString

      default String toDebugString(MetricSnapshots metricSnapshots)
      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.