Interface ExpositionFormatWriter

All Known Implementing Classes:
OpenMetricsTextFormatWriter, PrometheusProtobufWriter, PrometheusTextFormatWriter

public interface ExpositionFormatWriter
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accepts(String acceptHeader)
     
     
    default boolean
    Returns true if the writer is available.
    default String
    toDebugString(io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots)
     
    void
    write(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots)
    Text formats use UTF-8 encoding.
  • Method Details

    • accepts

      boolean accepts(String acceptHeader)
    • write

      void write(OutputStream out, io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots) throws IOException
      Text formats use UTF-8 encoding.
      Throws:
      IOException
    • toDebugString

      default String toDebugString(io.prometheus.metrics.model.snapshots.MetricSnapshots metricSnapshots)
    • getContentType

      String getContentType()
    • isAvailable

      default boolean isAvailable()
      Returns true if the writer is available. If false, the writer will throw an exception if used.