Interface ConfigurableMetricReaderProvider
-
public interface ConfigurableMetricReaderProvider
A service provider interface (SPI) for providing additional metric readers that can be used with the autoconfigured SDK. If theotel.metrics.exporter
property contains a value equal to what is returned bygetName()
, the exporter returned bycreateMetricReader(ConfigProperties)
will be enabled and added to the SDK.Where as
ConfigurableMetricExporterProvider
provides push-basedMetricExporter
s to be paired withPeriodicMetricReader
, this SPI facilitates pull-basedMetricReader
s.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MetricReader
createMetricReader(ConfigProperties config)
Returns aMetricReader
that can be registered to OpenTelemetry by providing the property value specified bygetName()
.java.lang.String
getName()
Returns the name of this reader, which can be specified with theotel.metrics.exporter
property to enable it.
-
-
-
Method Detail
-
createMetricReader
MetricReader createMetricReader(ConfigProperties config)
Returns aMetricReader
that can be registered to OpenTelemetry by providing the property value specified bygetName()
.
-
getName
java.lang.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.
-
-