Class PrometheusTextFormat


  • public class PrometheusTextFormat
    extends java.lang.Object
    Logic to write metrics in Prometheus text format.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.Set<java.lang.String> metricNameSet  
    • Field Detail

      • metricNameSet

        java.util.Set<java.lang.String> metricNameSet
    • Constructor Detail

      • PrometheusTextFormat

        public PrometheusTextFormat()
    • Method Detail

      • writeGauge

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

        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
      • writeType

        void writeType​(java.io.Writer w,
                       java.lang.String name,
                       java.lang.String type)
                throws java.io.IOException
        Throws:
        java.io.IOException