Class DataPointSnapshot.Builder<T extends DataPointSnapshot.Builder<T>>

java.lang.Object
io.prometheus.metrics.model.snapshots.DataPointSnapshot.Builder<T>
Direct Known Subclasses:
CounterSnapshot.CounterDataPointSnapshot.Builder, GaugeSnapshot.GaugeDataPointSnapshot.Builder, HistogramSnapshot.HistogramDataPointSnapshot.Builder, InfoSnapshot.InfoDataPointSnapshot.Builder, StateSetSnapshot.StateSetDataPointSnapshot.Builder, SummarySnapshot.SummaryDataPointSnapshot.Builder, UnknownSnapshot.UnknownDataPointSnapshot.Builder
Enclosing class:
DataPointSnapshot

public abstract static class DataPointSnapshot.Builder<T extends DataPointSnapshot.Builder<T>> extends Object
  • Field Details

    • labels

      protected Labels labels
    • scrapeTimestampMillis

      protected long scrapeTimestampMillis
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • labels

      public T labels(Labels labels)
    • scrapeTimestampMillis

      public T scrapeTimestampMillis(long scrapeTimestampMillis)
      In most cases you should not set a scrape timestamp, because the scrape timestamp is set by the Prometheus server during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
    • self

      protected abstract T self()