Class DistributionDataPointSnapshot

java.lang.Object
io.prometheus.metrics.model.snapshots.DataPointSnapshot
io.prometheus.metrics.model.snapshots.DistributionDataPointSnapshot
Direct Known Subclasses:
HistogramSnapshot.HistogramDataPointSnapshot, SummarySnapshot.SummaryDataPointSnapshot

public abstract class DistributionDataPointSnapshot extends DataPointSnapshot
Common base class for histogram and summary data. Histograms and Summaries represent distributions, like a latency distribution or a distribution of request sizes in Bytes.
  • Constructor Details

    • DistributionDataPointSnapshot

      protected DistributionDataPointSnapshot(long count, double sum, Exemplars exemplars, Labels labels, long createdTimestampMillis, long scrapeTimestampMillis)
      See JavaDoc of the child classes.
  • Method Details

    • hasCount

      public boolean hasCount()
    • hasSum

      public boolean hasSum()
    • getCount

      public long getCount()
      This will return garbage if hasCount() is false.
    • getSum

      public double getSum()
      This will return garbage if hasSum() is false.
    • getExemplars

      public Exemplars getExemplars()
      May be Exemplars.EMPTY, but will never be null.