Class DoubleExemplarData

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

@Immutable public abstract class DoubleExemplarData extends Object implements ExemplarData
An ExemplarData with double measurements.
  • 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 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: 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