java.lang.Object
io.prometheus.metrics.model.snapshots.Exemplar
Immutable representation of an Exemplar.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Exemplar.Builderbuilder()longWill return garbage ifhasTimestamp()isfalse.doublegetValue()boolean
-
Field Details
-
TRACE_ID
Label name for trace id.- See Also:
-
SPAN_ID
Label name for span id.- See Also:
-
-
Constructor Details
-
Exemplar
To create a newExemplar, you can either call the constructor directly or use the Builder withbuilder().- Parameters:
value- the observed value. This is required.labels- in most cases the labels will contain theTRACE_IDandSPAN_ID. Must not benull. UseLabels.EMPTYif no labels are present.timestampMillis- timestamp when the value was observed. Optional. Use 0L if not available.
-
-
Method Details
-
getValue
public double getValue() -
getLabels
In most cases labels will containTRACE_IDandSPAN_ID, but this is not required. May beLabels.EMPTY, but may not benull. -
hasTimestamp
public boolean hasTimestamp() -
getTimestampMillis
public long getTimestampMillis()Will return garbage ifhasTimestamp()isfalse. -
builder
-