Class MetricData


  • @Immutable
    public abstract class MetricData
    extends Object
    A MetricData represents the data exported as part of aggregating one Instrument.
    • Method Detail

      • getResource

        public abstract io.opentelemetry.sdk.resources.Resource getResource()
        Returns the resource of this MetricData.
        Returns:
        the resource of this MetricData.
      • getInstrumentationLibraryInfo

        public abstract io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo()
        Returns the instrumentation library specified when creating the Meter which created the Instrument that produces MetricData.
        Returns:
        an instance of InstrumentationLibraryInfo
      • getName

        public abstract String getName()
        Returns the metric name.
        Returns:
        the metric name.
      • getDescription

        public abstract String getDescription()
        Returns the description of this metric.
        Returns:
        the description of this metric.
      • getUnit

        public abstract String getUnit()
        Returns the unit of this metric.
        Returns:
        the unit of this metric.
      • getType

        public abstract MetricDataType getType()
        Returns the type of this metric.
        Returns:
        the type of this metric.
      • isEmpty

        public boolean isEmpty()
        Returns true if there are no points associated with this metric.
        Returns:
        true if there are no points associated with this metric.