@Immutable
public abstract class MetricData
extends java.lang.Object
MetricData
represents the data exported as part of aggregating one Instrument
.Modifier and Type | Class and 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 |
Modifier and Type | Method and 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.Point s 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.
|
public abstract io.opentelemetry.sdk.resources.Resource getResource()
MetricData
.MetricData
.public abstract io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo()
Meter
which created the
Instrument
that produces MetricData
.InstrumentationLibraryInfo
public abstract java.lang.String getName()
public abstract java.lang.String getDescription()
public abstract java.lang.String getUnit()
public abstract MetricData.Type getType()
public abstract java.util.Collection<MetricData.Point> getPoints()
MetricData.Point
s for this metric.
Only one type of points are available at any moment for a MetricData
, and the type
is determined by the MetricData.Type
.
MetricData.Point
s for this metric, or empty Collection
if no points.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)