Interface ExportableMetric

All Superinterfaces:
Keyed
All Known Implementing Classes:
ClientExportableMetric, ContextExportableMetric

public interface ExportableMetric extends Keyed
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 Type
    Method
    Description
    static io.opentelemetry.proto.metrics.v1.MetricsData
    Construct a MetricsData by binding the underlying Metric to the Resource and InstrumentationScope in this ExportableMetric.
    static io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest
    Construct a ExportMetricsServiceRequest by binding the underlying Metric to the Resource and InstrumentationScope in this ExportableMetric.
    io.opentelemetry.proto.common.v1.InstrumentationScope
     
    io.opentelemetry.proto.metrics.v1.Metric
     
    io.opentelemetry.proto.resource.v1.Resource
     
    io.opentelemetry.proto.metrics.v1.ResourceMetrics
     

    Methods inherited from interface Keyed

    key
  • Method Details

    • buildMetricsData

      static io.opentelemetry.proto.metrics.v1.MetricsData buildMetricsData(ExportableMetric exportable)
      Construct a MetricsData by binding the underlying Metric to the Resource and InstrumentationScope in this ExportableMetric.
    • buildRequest

      static io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest buildRequest(Collection<ExportableMetric> exportables)
      Construct a ExportMetricsServiceRequest by binding the underlying Metric to the Resource and InstrumentationScope in this ExportableMetric.
    • metric

      io.opentelemetry.proto.metrics.v1.Metric metric()
      Returns:
      the Metric associated with this ContextExportableMetric
    • resource

      io.opentelemetry.proto.resource.v1.Resource resource()
      Returns:
      the Resource associated with this ContextExportableMetric
    • instrumentationScope

      io.opentelemetry.proto.common.v1.InstrumentationScope instrumentationScope()
      Returns:
      the InstrumentationScope associated with this ContextExportableMetric
    • resourceMetrics

      io.opentelemetry.proto.metrics.v1.ResourceMetrics resourceMetrics()
      Returns:
      the ResourceMetrics associated with this ContextExportableMetric