Class LongExemplar

  • All Implemented Interfaces:
    Exemplar

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

      • create

        public static LongExemplar create​(io.opentelemetry.api.common.Attributes filteredAttributes,
                                          long recordTimeNanos,
                                          String spanId,
                                          String traceId,
                                          long 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 long 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