Files
codex/codex-rs/otel/tests/suite
daniel-oai 28b91c7c31 Honor the OTLP metrics temporality preference (#51220)
## Why

Some metrics backends require cumulative metrics, while configured OTLP exporters previously always used delta temporality.

## What changed

Read `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` for configured HTTP and gRPC metrics exporters. Accept `delta`, `cumulative`, and `lowmemory` case-insensitively, retaining delta for unset, empty, or unrecognized values. Document the setting and preserve existing temporality for the built-in Statsig exporter and runtime snapshots.

## Testing

Update the HTTP loopback test to set the preference in an isolated subprocess and assert that the exported counter uses cumulative aggregation temporality.

GitOrigin-RevId: ca212eea20054b947005d323186c8b9a819ace9d
2026-10-06 01:36:17 +00:00
..