Class DoubleExemplarData
java.lang.Object
io.opentelemetry.sdk.metrics.data.DoubleExemplarData
- All Implemented Interfaces:
ExemplarData
An
ExemplarData with double measurements.-
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleExemplarDatacreate(io.opentelemetry.api.common.Attributes filteredAttributes, long recordTimeNanos, String spanId, String traceId, double value) Construct a new exemplar.abstract doublegetValue()Numerical value of the measurement that was recorded.final doubleCoerces this exemplar to a double value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.sdk.metrics.data.ExemplarData
getEpochNanos, getFilteredAttributes, getSpanId, getTraceId
-
Method Details
-
create
public static DoubleExemplarData create(io.opentelemetry.api.common.Attributes filteredAttributes, long recordTimeNanos, @Nullable String spanId, @Nullable String traceId, double value) Construct a new exemplar.- Parameters:
filteredAttributes- The set ofAttributesnot already associated with thePointData.recordTimeNanos- The time when the sample qas recorded in nanoseconds.spanId- (optional) The associated SpanId.traceId- (optional) The associated TraceId.value- The value recorded.
-
getValue
public abstract double getValue()Numerical value of the measurement that was recorded. -
getValueAsDouble
public final double getValueAsDouble()Description copied from interface:ExemplarDataCoerces this exemplar to a double value.Note: This could create a loss of precision from
longmeasurements.- Specified by:
getValueAsDoublein interfaceExemplarData
-