From 84696e3d576c3bf7a0989964d772eb96b10cfb92 Mon Sep 17 00:00:00 2001 From: keith thornhill Date: Mon, 13 Jul 2026 17:51:20 +0000 Subject: [PATCH] Expand millisecond duration histogram boundaries (#32844) ## What changed Add finer-grained buckets from 1 to 10 seconds and extend millisecond duration histograms with buckets up to 120 seconds. GitOrigin-RevId: dee492de08db058444926d22281ef7bc4ba1cdeb --- codex-rs/otel/src/metrics/client.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codex-rs/otel/src/metrics/client.rs b/codex-rs/otel/src/metrics/client.rs index d3c7e0d70991..ec90584e0a0c 100644 --- a/codex-rs/otel/src/metrics/client.rs +++ b/codex-rs/otel/src/metrics/client.rs @@ -46,8 +46,10 @@ const METER_NAME: &str = "codex"; const MILLISECOND_DURATION_UNIT: &str = "ms"; const MILLISECOND_DURATION_DESCRIPTION: &str = "Duration in milliseconds."; const MILLISECOND_DURATION_BOUNDARIES: &[f64] = &[ - 0.0, 5.0, 10.0, 25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 750.0, 1000.0, 2500.0, 5000.0, 7500.0, - 10000.0, + 0.0, 5.0, 10.0, 25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 750.0, 1_000.0, 1_250.0, 1_500.0, + 1_750.0, 2_000.0, 2_250.0, 2_500.0, 3_000.0, 3_500.0, 4_000.0, 4_500.0, 5_000.0, 6_000.0, + 7_000.0, 7_500.0, 8_000.0, 9_000.0, 10_000.0, 12_000.0, 15_000.0, 20_000.0, 30_000.0, 60_000.0, + 120_000.0, ]; const SECOND_DURATION_UNIT: &str = "s"; const SECOND_DURATION_BOUNDARIES: &[f64] = &[