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 MetricExporter
s to be paired with PeriodicMetricReader
, this SPI facilitates pull-based
MetricReader
s.
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 TypeMethodDescriptioncreateMetricReader
(ConfigProperties config) Returns aMetricReader
that can be registered to OpenTelemetry by providing the property value specified bygetName()
.getName()
Returns the name of this reader, which can be specified with theotel.metrics.exporter
property to enable it.
-
Method Details
-
createMetricReader
Returns aMetricReader
that can be registered to OpenTelemetry by providing the property value specified bygetName()
. -
getName
String getName()Returns the name of this reader, which can be specified with theotel.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 orConfigurableMetricExporterProvider
. 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.
-