Interface ExportableMetric
- All Superinterfaces:
Keyed
- All Known Implementing Classes:
ClientExportableMetric,ContextExportableMetric
The
ExportableMetric interface represents a metric that can be exported. It extends the
Keyed interface, which provides a key for the metric.
This interface provides methods to retrieve the underlying metric, resource, and instrumentation scope associated with the exportable metric.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.proto.metrics.v1.MetricsDatabuildMetricsData(ExportableMetric exportable) Construct aMetricsDataby binding the underlyingMetricto theResourceandInstrumentationScopein this ExportableMetric.static io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequestbuildRequest(Collection<ExportableMetric> exportables) Construct aExportMetricsServiceRequestby binding the underlyingMetricto theResourceandInstrumentationScopein this ExportableMetric.io.opentelemetry.proto.common.v1.InstrumentationScopeio.opentelemetry.proto.metrics.v1.Metricmetric()io.opentelemetry.proto.resource.v1.Resourceresource()io.opentelemetry.proto.metrics.v1.ResourceMetrics
-
Method Details
-
buildMetricsData
Construct aMetricsDataby binding the underlyingMetricto theResourceandInstrumentationScopein this ExportableMetric. -
buildRequest
static io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest buildRequest(Collection<ExportableMetric> exportables) Construct aExportMetricsServiceRequestby binding the underlyingMetricto theResourceandInstrumentationScopein this ExportableMetric. -
metric
io.opentelemetry.proto.metrics.v1.Metric metric()- Returns:
- the
Metricassociated with this ContextExportableMetric
-
resource
io.opentelemetry.proto.resource.v1.Resource resource()- Returns:
- the
Resourceassociated with this ContextExportableMetric
-
instrumentationScope
io.opentelemetry.proto.common.v1.InstrumentationScope instrumentationScope()- Returns:
- the
InstrumentationScopeassociated with this ContextExportableMetric
-
resourceMetrics
io.opentelemetry.proto.metrics.v1.ResourceMetrics resourceMetrics()- Returns:
- the
ResourceMetricsassociated with this ContextExportableMetric
-