Metrics

This file tracks compliance for the OpenTelemetry metrics specification in this repository.

Scope

Module mapping

metrics/sdk.md checklist

Area Requirement Status Evidence Notes
MeterProvider Builder supports resource, views, readers, producers Compliant SdkMeterProvider.scala
MeterProvider Default config (default resource, no readers/producers, noop lookup) Compliant SdkMeterProvider.scala
MeterProvider ForceFlush / Shutdown support Partial MeterProviderAutoConfigure.scala Provider lifecycle is Resource-managed; no explicit shutdown/forceFlush API in core interface
Meter Noop meter when no readers configured Compliant SdkMeterProvider.scala
Views View + selector registry Compliant ViewRegistry.scala, MetricStorageRegistry.scala, MeterSharedState.scala Selector matching and duplicate-name conflict warning are implemented
Aggregation Aggregation + selectors + temporality selectors Partial Aggregation.scala, AggregationSelector.scala, AggregationTemporalitySelector.scala, Aggregator.scala Aggregation.Sum compatibility set omits ObservableCounter, so View.withAggregation(Aggregation.sum) is treated as incompatible for that instrument
Explicit Bucket Histogram Aggregation RecordMinMax config parameter Compliant ExplicitBucketHistogramOptions.scala, Aggregation.scala, ExplicitBucketHistogramAggregator.scala recordMinMax=false suppresses min/max while keeping count and sum
Attribute limits Attributes are exempt from limits Not Applicable Spec states metric attributes are exempt from attribute limits
Cardinality limits Default 2000 + overflow attribute + warning Compliant CardinalityLimitSelector.scala, SynchronousStorage.scala, AsynchronousStorage.scala Uses otel.metric.overflow attribute on overflow
Exemplar Exemplar data + filters + reservoirs Compliant ExemplarFilter.scala, ExemplarFilter.scala, ExemplarReservoir.scala, Reservoirs.scala, ExemplarData.scala AlwaysOn/AlwaysOff/TraceBased filters and fixed-size/histogram reservoirs are implemented
Exemplar Custom ExemplarReservoir per-view configurability Partial View.scala View does not expose reservoir configuration
MetricReader Interface + periodic reader Partial MetricReader.scala, PeriodicMetricReader.scala, PeriodicMetricReader.scala forceFlush performs collection and calls exporter flush; lifecycle remains Resource-managed and there is no explicit shutdown API.
MetricReader Prevent registration on multiple MeterProviders Partial PeriodicMetricReader.scala Logs warning but does not error
MetricExporter Push/Pull interfaces + noop Partial MetricExporter.scala, MetricExporter.scala, MetricExporter.scala Push/pull interfaces and noop are implemented; flush covers force-flush semantics, but explicit exporter shutdown is missing.
MetricProducer Interface + registration Compliant MetricProducer.scala, MetricReader.scala, PeriodicMetricReader.scala produce API exists and producers are registered by reader
MetricFilter Filtering support Not Implemented SdkMeterProvider.scala, SdkMeterProvider.scala No MetricFilter API or implementation found; builder/configuration path supports views and exemplar filtering only
Temporality Delta/Cumulative collection semantics Compliant SynchronousStorage.scala, AsynchronousStorage.scala, RegisteredReader.scala Delta uses per-reader last-collect timestamp and reset/diff semantics; cumulative uses stable start times
Numerical limits Handling for NaN/Inf, etc. Partial SynchronousStorage.scala Drops NaN for synchronous double values; no explicit Inf handling

metrics/data-model.md checklist

Area Requirement Status Evidence Notes
Metric data types MetricData, Points, Temporality Compliant MetricData.scala, MetricPoints.scala, PointData.scala, AggregationTemporality.scala Core metric container/points/temporality model is implemented; unsupported point kinds are tracked separately
Point kinds Sum/Gauge/Histogram Compliant MetricPoints.scala, PointData.scala
Point kinds ExponentialHistogram Compliant MetricPoints.scala, PointData.scala
Point kinds Summary (legacy) Missing MetricPoints.scala, PointData.scala No summary support in data model
Exemplars Exemplar data and trace context Compliant ExemplarData.scala Includes filtered attributes, timestamp, value, and optional trace context
Data point flags No-recorded-value flag Missing PointData.scala No flags representation in PointData
Temporality Delta/Cumulative semantics Compliant SynchronousStorage.scala, AsynchronousStorage.scala, RegisteredReader.scala, SdkMeterProvider.scala Per-reader last-collect timestamps used for delta; cumulative keeps fixed start time
Time windows Start/End timestamps per point Compliant TimeWindow.scala, MeterSharedState.scala, SynchronousStorage.scala, AsynchronousStorage.scala Start/end windows are carried into all point generation paths
Resets/Gaps/Overlap Handling Missing SynchronousStorage.scala, AsynchronousStorage.scala No explicit reset-gap-overlap handling observed in SDK data model or storage

metrics/sdk_exporters

Area Requirement Status Evidence Notes
SDK Exporter stdout.md Partial ConsoleMetricExporter.scala Verify output format requirements
SDK Exporter in-memory.md Partial InMemoryMetricExporter.scala, InMemoryMetricReader.scala Available in testkit module; not exposed as a production exporter module under sdk-exporter/*
SDK Exporter otlp.md Partial OtlpMetricExporter.scala, OtlpMetricExporterAutoConfigure.scala, OtlpMetricExporterAutoConfigureSuite.scala, OtlpClientAutoConfigure.scala OTLP protocol config and env config for temporality/default histogram aggregation are wired. Both explicit_bucket_histogram and base2_exponential_bucket_histogram are supported.
SDK Exporter prometheus.md Partial PrometheusMetricExporter.scala, PrometheusHttpRoutes.scala, PrometheusWriter.scala Pull exporter with text format 0.0.4, cumulative temporality; content negotiation is minimal (text/* only), no translation_strategy config

Cross-cutting specs