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>> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis, boolean internal) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract DataPointSnapshotescape(EscapingScheme escapingScheme) longThis will only return a reasonable value ifhasCreatedTimestamp()is true.longThis will only return a reasonable value ifhasScrapeTimestamp()is true.booleanbooleanprivate voidvalidate()
-
Field Details
-
labels
-
createdTimestampMillis
private final long createdTimestampMillis -
scrapeTimestampMillis
private final long scrapeTimestampMillis
-
-
Constructor Details
-
DataPointSnapshot
protected DataPointSnapshot(Labels labels, long createdTimestampMillis, long scrapeTimestampMillis, boolean internal)
-
-
Method Details
-
validate
private void validate() -
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. -
escape
-