Class GaugeSnapshot.GaugeDataPointSnapshot
Object
DataPointSnapshot
GaugeDataPointSnapshot
- Enclosing class:
- GaugeSnapshot
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionGaugeDataPointSnapshot
(double value, Labels labels, Exemplar exemplar) To create a newGaugeSnapshot.GaugeDataPointSnapshot
, you can either call the constructor directly or use the Builder withbuilder()
.GaugeDataPointSnapshot
(double value, Labels labels, Exemplar exemplar, long scrapeTimestampMillis) Constructor with an additional scrape timestamp. -
Method Summary
Methods inherited from class DataPointSnapshot
getCreatedTimestampMillis, getLabels, getScrapeTimestampMillis, hasCreatedTimestamp, hasScrapeTimestamp
-
Constructor Details
-
GaugeDataPointSnapshot
To create a newGaugeSnapshot.GaugeDataPointSnapshot
, you can either call the constructor directly or use the Builder withbuilder()
.- Parameters:
value
- the gauge value.labels
- must not be null. UseLabels.EMPTY
if there are no labels.exemplar
- may be null.
-
GaugeDataPointSnapshot
public GaugeDataPointSnapshot(double value, Labels labels, 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
-
getValue
-
getExemplar
May benull
. -
builder
-