Class TextPrometheusMetricDataParser

    • Constructor Detail

      • TextPrometheusMetricDataParser

        public TextPrometheusMetricDataParser​(InputStream inputStream)
        Provides the input stream where the parser will look for metric data. NOTE: this object will not own this stream - it should never attempt to close it.
        Parameters:
        inputStream - the stream where the metric data can be found
    • Method Detail

      • parse

        public MetricFamily parse()
                           throws IOException
        Description copied from class: PrometheusMetricDataParser
        Reads a single metric family from the Prometheus metric data stream and returns it. Returns null when no more data is in the stream. This method is designed to be called several times, each time it returns the next metric family found in the input stream.
        Specified by:
        parse in class PrometheusMetricDataParser<MetricFamily>
        Returns:
        the metric family data found in the stream, or null
        Throws:
        IOException - if failed to read the data from the stream