Class BuildInfoCollector

java.lang.Object
io.prometheus.client.Collector
io.prometheus.jmx.BuildInfoCollector

public class BuildInfoCollector extends io.prometheus.client.Collector
Collects jmx_exporter build version info.

Example usage:


 new BuildInfoCollector().register();
 
Metrics being exported:
   jmx_exporter_build_info{version="3.2.0",name="jmx_prometheus_httpserver",} 1.0
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.prometheus.client.Collector

    io.prometheus.client.Collector.Describable, io.prometheus.client.Collector.MetricFamilySamples, io.prometheus.client.Collector.Type
  • Field Summary

    Fields inherited from class io.prometheus.client.Collector

    MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    List<io.prometheus.client.Collector.MetricFamilySamples>
    Method to get the List of MetricFamilySamples

    Methods inherited from class io.prometheus.client.Collector

    checkMetricLabelName, checkMetricName, collect, doubleToGoString, register, register, sanitizeMetricName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • collect

      public List<io.prometheus.client.Collector.MetricFamilySamples> collect()
      Method to get the List of MetricFamilySamples
      Specified by:
      collect in class io.prometheus.client.Collector
      Returns:
      the return value