In addition to properties provided by Tracing, following MicroProfile Config Properties are available to configure metrics-related behavior of OpenTelemetry SDK:
otlp exporter MUST be supported by implementeion. Other exporters are obtainable via Service Loader
Service Loader
Metric Exporter components specified in otel.metric.exporter may be looked up by means of Service Loader mechanism using service class io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider
Injectable Types
io.opentelemetry.api.metrics.Meter injects pre-configured Meter instance.
Additionally OpenTelemetry.getMeterProvider() returns appropriately configured provider instance; consumer however MUST use the exact same instrumentation name and version used by the implementation in order to match configured metric processing pipeline.
Description
This issue describes the API surface of Otel Metrics API that implementors would need to make available. This is to be included to spec draft.
Supported API Classes
Main API access
io.opentelemetry.api.metrics
(opentelemetry-api, stable)Provider Customization Access via
AutoConfigurationCustomizer.addMeterProviderCustomizer
io.opentelemetry.sdk.metrics
(opentelemetry-sdk-metrics, stable)MetricExporter
io.opentelemetry.sdk.metrics.export
(opentelemetry-sdk-metrics, stable)io.opentelemetry.sdk.metrics.data
(opentelemetry-sdk-metrics, stable)Configuration
In addition to properties provided by Tracing, following MicroProfile Config Properties are available to configure metrics-related behavior of OpenTelemetry SDK:
otel.metrics.exporter
otel.exporter.otlp.metrics.endpoint
otel.exporter.otlp.metrics.certificate
otel.exporter.otlp.metrics.client.key
otel.exporter.otlp.metrics.client.certificate
otel.exporter.otlp.metrics.headers
otel.exporter.otlp.metrics.compression
otel.exporter.otlp.metrics.timeout
otel.exporter.otlp.metrics.protocol
otel.exporter.otlp.metrics.temporality.preference
otel.exporter.otlp.metrics.default.histogram.aggregation
otel.metrics.exemplar.filter
otel.metric.export.interval
otlp
exporter MUST be supported by implementeion. Other exporters are obtainable via Service LoaderService Loader
Metric Exporter components specified in
otel.metric.exporter
may be looked up by means of Service Loader mechanism using service classio.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider
Injectable Types
io.opentelemetry.api.metrics.Meter
injects pre-configuredMeter
instance.Additionally
OpenTelemetry.getMeterProvider()
returns appropriately configured provider instance; consumer however MUST use the exact same instrumentation name and version used by the implementation in order to match configured metric processing pipeline.