From fb93408475825658d7c16b95e99a5a1900e72d53 Mon Sep 17 00:00:00 2001 From: bdchatham Date: Tue, 28 Apr 2026 09:20:51 -0700 Subject: [PATCH] fix(metrics): drop redundant _seconds suffix on run_duration metric name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The metric was declared as `run_duration_seconds` AND given `metric.WithUnit("s")`. The OTel Prometheus exporter appends `_seconds` to any metric carrying unit `s`, so this exported as `seiload_run_duration_seconds_seconds` — a double-suffix that broke PromQL queries assuming the canonical OTel-conventional name. Compare with `block_time` in this same file: name `block_time` + unit `s` exports cleanly as `seiload_block_time_seconds`. Apply the same convention to `run_duration` so it exports as `seiload_run_duration_seconds`. The harbor nightly alert (alerts-nightly.yaml) currently queries the double-suffixed name; it will be updated in a paired platform-repo PR that also bumps the pinned seiload image tag, atomically swapping emitter and consumer. Co-Authored-By: Claude Opus 4.7 (1M context) --- stats/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stats/metrics.go b/stats/metrics.go index 984b3bf..75bce3d 100644 --- a/stats/metrics.go +++ b/stats/metrics.go @@ -33,7 +33,7 @@ var ( metric.WithUnit("{transactions}/s"))) runDurationSeconds = must(meter.Float64Gauge( - "run_duration_seconds", + "run_duration", metric.WithDescription("Wall-clock duration of this run (emitted once at run end)"), metric.WithUnit("s")))