Class LongExemplarData

java.lang.Object
io.opentelemetry.sdk.metrics.data.LongExemplarData
All Implemented Interfaces:
ExemplarData

@Immutable public abstract class LongExemplarData extends Object implements ExemplarData
An ExemplarData with long measurements.
  • Method Details

    • create

      public static LongExemplarData create(io.opentelemetry.api.common.Attributes filteredAttributes, long recordTimeNanos, io.opentelemetry.api.trace.SpanContext spanContext, 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.
      spanContext - The associated span context.
      value - The value recorded.
    • getValue

      public abstract long getValue()
      Numerical value of the measurement that was recorded.
    • getValueAsDouble

      @Deprecated public final double getValueAsDouble()
      Deprecated.
      Description copied from interface: ExemplarData
      Coerces this exemplar to a double value.

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

      Specified by:
      getValueAsDouble in interface ExemplarData