eclipse / microprofile-telemetry

microprofile telemetry
Apache License 2.0
16 stars 16 forks source link

Telemetry Metrics API requirements #134

Closed pdudits closed 4 months ago

pdudits commented 8 months ago

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

Provider Customization Access via AutoConfigurationCustomizer.addMeterProviderCustomizer

MetricExporter

Configuration

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.

Emily-Jiang commented 6 months ago

@pdudits please go ahead to update the spec doc with the above info.