Module io.prometheus.metrics.model
Class DataPointSnapshot
java.lang.Object
io.prometheus.metrics.model.snapshots.DataPointSnapshot
- Direct Known Subclasses:
CounterSnapshot.CounterDataPointSnapshot,DistributionDataPointSnapshot,GaugeSnapshot.GaugeDataPointSnapshot,InfoSnapshot.InfoDataPointSnapshot,StateSetSnapshot.StateSetDataPointSnapshot,UnknownSnapshot.UnknownDataPointSnapshot
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDataPointSnapshot.Builder<T extends DataPointSnapshot.Builder<T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis) -
Method Summary
Modifier and TypeMethodDescriptionlongThis will only return a reasonable value ifhasCreatedTimestamp()is true.longThis will only return a reasonable value ifhasScrapeTimestamp()is true.booleanboolean
-
Constructor Details
-
DataPointSnapshot
-
-
Method Details
-
getLabels
-
hasScrapeTimestamp
public boolean hasScrapeTimestamp() -
getScrapeTimestampMillis
public long getScrapeTimestampMillis()This will only return a reasonable value ifhasScrapeTimestamp()is true. -
hasCreatedTimestamp
public boolean hasCreatedTimestamp() -
getCreatedTimestampMillis
public long getCreatedTimestampMillis()This will only return a reasonable value ifhasCreatedTimestamp()is true. Some metrics like Gauge don't have created timestamps. For these metricshasCreatedTimestamp()is always false.
-