Class MetricData


  • @Immutable
    public abstract class MetricData
    extends java.lang.Object
    A MetricData represents the data exported as part of aggregating one Instrument.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MetricData.DoublePoint
      DoublePoint is a single data point in a timeseries that describes the time-varying value of a double metric.
      static class  MetricData.LongPoint
      LongPoint is a single data point in a timeseries that describes the time-varying values of a int64 metric.
      static class  MetricData.Point  
      static class  MetricData.SummaryPoint
      SummaryPoint is a single data point that summarizes the values in a time series of numeric values.
      static class  MetricData.Type
      The kind of metric.
      static class  MetricData.ValueAtPercentile  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static MetricData create​(io.opentelemetry.sdk.resources.Resource resource, io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo, java.lang.String name, java.lang.String description, java.lang.String unit, MetricData.Type type, java.util.Collection<MetricData.Point> points)  
      abstract java.lang.String getDescription()
      Returns the description of this metric.
      abstract io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo()
      Returns the instrumentation library specified when creating the Meter which created the Instrument that produces MetricData.
      abstract java.lang.String getName()
      Returns the metric name.
      abstract java.util.Collection<MetricData.Point> getPoints()
      Returns the data MetricData.Points for this metric.
      abstract io.opentelemetry.sdk.resources.Resource getResource()
      Returns the resource of this MetricData.
      abstract MetricData.Type getType()
      Returns the type of this metric.
      abstract java.lang.String getUnit()
      Returns the unit of this metric.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.lang.String getName()
        Returns the metric name.
        Returns:
        the metric name.
      • getDescription

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

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

        public abstract MetricData.Type getType()
        Returns the type of this metric.
        Returns:
        the type of this metric.
      • create

        public static MetricData create​(io.opentelemetry.sdk.resources.Resource resource,
                                        io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo,
                                        java.lang.String name,
                                        java.lang.String description,
                                        java.lang.String unit,
                                        MetricData.Type type,
                                        java.util.Collection<MetricData.Point> points)