Class DoubleExemplar

  • All Implemented Interfaces:
    Exemplar

    @Immutable
    public abstract class DoubleExemplar
    extends Object
    implements Exemplar
    An Exemplar with double measurments.
    • Method Detail

      • create

        public static DoubleExemplar create​(io.opentelemetry.api.common.Attributes filteredAttributes,
                                            long recordTimeNanos,
                                            String spanId,
                                            String traceId,
                                            double value)
        Construct a new exemplar.
        Parameters:
        filteredAttributes - The set of Attributes not already associated with the PointData.
        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: Exemplar
        Coerces this exemplar to a double value.

        Note: This could createa a loss of precision from long measurements.

        Specified by:
        getValueAsDouble in interface Exemplar