Class GaugeSnapshot.GaugeDataPointSnapshot

java.lang.Object
io.prometheus.metrics.model.snapshots.DataPointSnapshot
io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot
Enclosing class:
GaugeSnapshot

public static final class GaugeSnapshot.GaugeDataPointSnapshot extends DataPointSnapshot
  • Constructor Details

    • GaugeDataPointSnapshot

      public GaugeDataPointSnapshot(double value, Labels labels, @Nullable Exemplar exemplar)
      To create a new GaugeSnapshot.GaugeDataPointSnapshot, you can either call the constructor directly or use the Builder with builder().
      Parameters:
      value - the gauge value.
      labels - must not be null. Use Labels.EMPTY if there are no labels.
      exemplar - may be null.
    • GaugeDataPointSnapshot

      public GaugeDataPointSnapshot(double value, Labels labels, @Nullable Exemplar exemplar, long scrapeTimestampMillis)
      Constructor with an additional scrape timestamp. This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
  • Method Details