java.lang.Object
io.prometheus.metrics.core.metrics.Metric
All Implemented Interfaces:
io.prometheus.metrics.model.registry.Collector
Direct Known Subclasses:
MetricWithFixedMetadata

public abstract class Metric extends Object implements io.prometheus.metrics.model.registry.Collector
Common base class for all metrics.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final io.prometheus.metrics.model.snapshots.Labels
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Metric(Metric.Builder<?,?> builder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract io.prometheus.metrics.model.snapshots.MetricSnapshot
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.prometheus.metrics.model.registry.Collector

    collect, collect, collect, getPrometheusName
  • Field Details

    • constLabels

      protected final io.prometheus.metrics.model.snapshots.Labels constLabels
  • Constructor Details

  • Method Details

    • collect

      public abstract io.prometheus.metrics.model.snapshots.MetricSnapshot collect()
      Specified by:
      collect in interface io.prometheus.metrics.model.registry.Collector