Class PrometheusTextFormatUtil


  • public class PrometheusTextFormatUtil
    extends java.lang.Object
    Logic to write metrics in Prometheus text format.
    • Constructor Detail

      • PrometheusTextFormatUtil

        public PrometheusTextFormatUtil()
    • Method Detail

      • writeGauge

        static void writeGauge​(java.io.Writer w,
                               java.lang.String name,
                               SimpleGauge<? extends java.lang.Number> gauge)
      • writeCounter

        static void writeCounter​(java.io.Writer w,
                                 java.lang.String name,
                                 LongAdderCounter counter)
      • writeMetricsCollectedByPrometheusClient

        static void writeMetricsCollectedByPrometheusClient​(java.io.Writer w,
                                                            io.prometheus.client.CollectorRegistry registry)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException