Class AutoValue_ImmutableMetricData
java.lang.Object
io.opentelemetry.sdk.metrics.internal.data.ImmutableMetricData
io.opentelemetry.sdk.metrics.internal.data.AutoValue_ImmutableMetricData
- All Implemented Interfaces:
MetricData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Data
<?> private final String
private final InstrumentationScopeInfo
private final String
private final Resource
private final MetricDataType
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionAutoValue_ImmutableMetricData
(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, String name, String description, String unit, MetricDataType type, Data<?> data) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Data
<?> getData()
Returns the unconstrained metric data.Returns the metric description.Returns the metricInstrumentationScopeInfo
.getName()
Returns the metric name.Returns the metricResource
.getType()
Returns the type of this metric.getUnit()
Returns the metric unit.int
hashCode()
toString()
Methods inherited from class io.opentelemetry.sdk.metrics.internal.data.ImmutableMetricData
create, createDoubleGauge, createDoubleHistogram, createDoubleSum, createDoubleSummary, createExponentialHistogram, createLongGauge, createLongSum
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.opentelemetry.sdk.metrics.data.MetricData
getDoubleGaugeData, getDoubleSumData, getExponentialHistogramData, getHistogramData, getLongGaugeData, getLongSumData, getSummaryData, isEmpty
-
Field Details
-
resource
-
instrumentationScopeInfo
-
name
-
description
-
unit
-
type
-
data
-
-
Constructor Details
-
AutoValue_ImmutableMetricData
AutoValue_ImmutableMetricData(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, String name, String description, String unit, MetricDataType type, Data<?> data)
-
-
Method Details
-
getResource
Description copied from interface:MetricData
Returns the metricResource
.The
Resource
is configured viaSdkMeterProviderBuilder.setResource(Resource)
. -
getInstrumentationScopeInfo
Description copied from interface:MetricData
Returns the metricInstrumentationScopeInfo
.The
InstrumentationScopeInfo
is determined from the options used whenMeterBuilder.build()
ing theMeter
. -
getName
Description copied from interface:MetricData
Returns the metric name.The metric name is typically the instrument name, but may be optionally overridden by a
View
. -
getDescription
Description copied from interface:MetricData
Returns the metric description.The metric name is typically the instrument description, but may be optionally overridden by a
View
. -
getUnit
Description copied from interface:MetricData
Returns the metric unit. -
getType
Description copied from interface:MetricData
Returns the type of this metric. -
getData
Description copied from interface:MetricData
Returns the unconstrained metric data.Most will instead prefer to access the constrained metric data after first checking the
MetricData.getType()
:// if (metricData.getType() == MetricDataType.LONG_SUM) { // SumData<LongPointData> sumData = metricData.getLongSumData(); // ... // Process long sum data // }
- See Also:
-
toString
-
equals
-
hashCode
public int hashCode()
-