From 855b9738110a1292a8f612a6e3fb70f7bd3e086c Mon Sep 17 00:00:00 2001 From: Vaclav Pavlin Date: Thu, 12 Dec 2024 11:45:47 +0100 Subject: [PATCH] chore: fix inconsistent metric naming (#1027) --- codex/blockexchange/engine/advertiser.nim | 6 +++--- codex/blockexchange/engine/discovery.nim | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/codex/blockexchange/engine/advertiser.nim b/codex/blockexchange/engine/advertiser.nim index 0b59d150..e4a97db1 100644 --- a/codex/blockexchange/engine/advertiser.nim +++ b/codex/blockexchange/engine/advertiser.nim @@ -26,7 +26,7 @@ import ../../manifest logScope: topics = "codex discoveryengine advertiser" -declareGauge(codexInflightAdvertise, "inflight advertise requests") +declareGauge(codex_inflight_advertise, "inflight advertise requests") const DefaultConcurrentAdvertRequests = 10 @@ -97,12 +97,12 @@ proc processQueueLoop(b: Advertiser) {.async.} = request = b.discovery.provide(cid) b.inFlightAdvReqs[cid] = request - codexInflightAdvertise.set(b.inFlightAdvReqs.len.int64) + codex_inflight_advertise.set(b.inFlightAdvReqs.len.int64) await request finally: b.inFlightAdvReqs.del(cid) - codexInflightAdvertise.set(b.inFlightAdvReqs.len.int64) + codex_inflight_advertise.set(b.inFlightAdvReqs.len.int64) except CancelledError: trace "Advertise task cancelled" return diff --git a/codex/blockexchange/engine/discovery.nim b/codex/blockexchange/engine/discovery.nim index 15312de9..f06105bf 100644 --- a/codex/blockexchange/engine/discovery.nim +++ b/codex/blockexchange/engine/discovery.nim @@ -31,7 +31,7 @@ import ../../manifest logScope: topics = "codex discoveryengine" -declareGauge(codexInflightDiscovery, "inflight discovery requests") +declareGauge(codex_inflight_discovery, "inflight discovery requests") const DefaultConcurrentDiscRequests = 10 @@ -96,7 +96,7 @@ proc discoveryTaskLoop(b: DiscoveryEngine) {.async.} = .wait(DefaultDiscoveryTimeout) b.inFlightDiscReqs[cid] = request - codexInflightDiscovery.set(b.inFlightDiscReqs.len.int64) + codex_inflight_discovery.set(b.inFlightDiscReqs.len.int64) let peers = await request @@ -110,7 +110,7 @@ proc discoveryTaskLoop(b: DiscoveryEngine) {.async.} = finally: b.inFlightDiscReqs.del(cid) - codexInflightDiscovery.set(b.inFlightDiscReqs.len.int64) + codex_inflight_discovery.set(b.inFlightDiscReqs.len.int64) except CancelledError: trace "Discovery task cancelled" return