Class DoublePointData

java.lang.Object
io.opentelemetry.sdk.metrics.data.DoublePointData
All Implemented Interfaces:
PointData

@Immutable public abstract class DoublePointData extends Object implements PointData
DoublePoint is a single data point in a timeseries that describes the time-varying value of a double metric.
  • Method Details

    • create

      public static DoublePointData create(long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Attributes attributes, double value)
      Creates a DoublePointData.
      Parameters:
      startEpochNanos - The starting time for the period where this point was sampled. Note: While start time is optional in OTLP, all SDKs should produce it for all their metrics, so it is required here.
      epochNanos - The ending time for the period when this value was sampled.
      attributes - The set of attributes associated with this point.
      value - The value that was sampled.
    • create

      public static DoublePointData create(long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Attributes attributes, double value, List<ExemplarData> exemplars)
      Creates a DoublePointData.
      Parameters:
      startEpochNanos - The starting time for the period where this point was sampled. Note: While start time is optional in OTLP, all SDKs should produce it for all their metrics, so it is required here.
      epochNanos - The ending time for the period when this value was sampled.
      attributes - The set of attributes associated with this point.
      value - The value that was sampled.
      exemplars - A collection of interesting sampled values from this time period.
    • getValue

      public abstract double getValue()
      Returns the value of the data point.
      Returns:
      the value of the data point.