Class SummarySnapshot.SummaryDataPointSnapshot

Enclosing class:
SummarySnapshot

  • Constructor Details

    • SummaryDataPointSnapshot

      public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis)
      To create a new SummarySnapshot.SummaryDataPointSnapshot, you can either call the constructor directly or use the Builder with builder().
      Parameters:
      count - total number of observations. Optional, pass -1 if not available.
      sum - sum of all observed values. Optional, pass Double.NaN if not available.
      quantiles - must not be null. Use Quantiles.EMPTY if there are no quantiles.
      labels - must not be null. Use Labels.EMPTY if there are no labels.
      exemplars - must not be null. Use Exemplars.EMPTY if there are no exemplars.
      createdTimestampMillis - timestamp (as in System.currentTimeMillis()) when this summary data (this specific set of labels) was created. Note that this refers to the creation of the timeseries, not the creation of the snapshot. The created timestamp optional. Use 0L if there is no created timestamp.
    • SummaryDataPointSnapshot

      public SummaryDataPointSnapshot(long count, double sum, Quantiles quantiles, Labels labels, Exemplars exemplars, long createdTimestampMillis, 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