Class StateSetSnapshot.StateSetDataPointSnapshot

java.lang.Object
io.prometheus.metrics.model.snapshots.DataPointSnapshot
io.prometheus.metrics.model.snapshots.StateSetSnapshot.StateSetDataPointSnapshot
All Implemented Interfaces:
Iterable<StateSetSnapshot.State>
Enclosing class:
StateSetSnapshot

public static class StateSetSnapshot.StateSetDataPointSnapshot extends DataPointSnapshot implements Iterable<StateSetSnapshot.State>
  • Constructor Details

    • StateSetDataPointSnapshot

      public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels)
      To create a new StateSetSnapshot.StateSetDataPointSnapshot, you can either call the constructor directly or use the Builder with builder().
      Parameters:
      names - state names. Must have at least 1 entry. The constructor will create a copy of the array.
      values - state values. Must have the same length as names. The constructor will create a copy of the array.
      labels - must not be null. Use Labels.EMPTY if there are no labels.
    • StateSetDataPointSnapshot

      public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, 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