From 18381a70806bfb72dea42d289102c6ccb9db447b Mon Sep 17 00:00:00 2001 From: Chet Nichols III Date: Mon, 13 Jul 2026 18:12:14 -0700 Subject: [PATCH] fix: reconcile the DHCP replies-sent counter's HELP across its two crates `carbide_dhcp_replies_sent_total` is emitted by two separate binaries -- the DHCP relay in `crates/dhcp` and the standalone DHCP server in `crates/dhcp-server` -- which declared it with divergent HELP text. `dhcp` describes it as "Number of DHCP replies sent, by reply message type."; `dhcp-server` said "Number of DHCP replies successfully sent, by reply message type." Same metric, same meaning, two strings, so a scraper sees inconsistent HELP depending on which process it hits, and a catalogue built by scanning declarations would face an ambiguous entry. The two are the same metric legitimately exported by two processes, so the fix is to unify the description, not to rename. `dhcp-server`'s "successfully" is redundant -- packets that never receive a reply are counted separately under its own drop counter -- so this aligns `dhcp-server` on `dhcp`'s shorter wording. - `crates/dhcp-server/src/metrics.rs`: drop "successfully" from the `replies_sent` describe so both crates declare identical HELP. The counter isn't exercised by `test_integration`, so it isn't in `core_metrics.md` today and there's no catalogue regen here; when the instrumentation doc-gate documents it, the reconciled HELP is what it will record. This supports https://github.com/NVIDIA/infra-controller/issues/3461 Signed-off-by: Chet Nichols III --- crates/dhcp-server/src/metrics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/dhcp-server/src/metrics.rs b/crates/dhcp-server/src/metrics.rs index 11de8fe305..3be82256ee 100644 --- a/crates/dhcp-server/src/metrics.rs +++ b/crates/dhcp-server/src/metrics.rs @@ -159,7 +159,7 @@ pub struct DhcpPacketDropped { component = "nico-dhcp", log = off, metric = counter, - describe = "Number of DHCP replies successfully sent, by reply message type." + describe = "Number of DHCP replies sent, by reply message type." )] pub struct DhcpReplySent { #[label]