Interface ConfigurableMetricReaderProvider


public interface ConfigurableMetricReaderProvider
A service provider interface (SPI) for providing additional metric readers that can be used with the autoconfigured SDK. If the otel.metrics.exporter property contains a value equal to what is returned by getName(), the exporter returned by createMetricReader(ConfigProperties) will be enabled and added to the SDK.

Where as ConfigurableMetricExporterProvider provides push-based MetricExporters to be paired with PeriodicMetricReader, this SPI facilitates pull-based MetricReaders.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a MetricReader that can be registered to OpenTelemetry by providing the property value specified by getName().
    Returns the name of this reader, which can be specified with the otel.metrics.exporter property to enable it.
  • Method Details

    • createMetricReader

      MetricReader createMetricReader(ConfigProperties config)
      Returns a MetricReader that can be registered to OpenTelemetry by providing the property value specified by getName().
    • getName

      String getName()
      Returns the name of this reader, which can be specified with the otel.metrics.exporter property to enable it. The name returned should NOT be the same as any other reader / exporter name, either from other implementations of this SPI or ConfigurableMetricExporterProvider. If the name does conflict with another reader / exporter name, the resulting behavior is undefined and it is explicitly unspecified which reader / exporter will actually be used.