Class DataPointSnapshot

java.lang.Object
io.prometheus.metrics.model.snapshots.DataPointSnapshot
Direct Known Subclasses:
CounterSnapshot.CounterDataPointSnapshot, DistributionDataPointSnapshot, GaugeSnapshot.GaugeDataPointSnapshot, InfoSnapshot.InfoDataPointSnapshot, StateSetSnapshot.StateSetDataPointSnapshot, UnknownSnapshot.UnknownDataPointSnapshot

public abstract class DataPointSnapshot extends Object
  • Constructor Details

    • DataPointSnapshot

      protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis, boolean internal)
  • Method Details

    • getLabels

      public Labels getLabels()
    • hasScrapeTimestamp

      public boolean hasScrapeTimestamp()
    • getScrapeTimestampMillis

      public long getScrapeTimestampMillis()
      This will only return a reasonable value if hasScrapeTimestamp() is true.
    • hasCreatedTimestamp

      public boolean hasCreatedTimestamp()
    • getCreatedTimestampMillis

      public long getCreatedTimestampMillis()
      This will only return a reasonable value if hasCreatedTimestamp() is true. Some metrics like Gauge don't have created timestamps. For these metrics hasCreatedTimestamp() is always false.