diff --git a/packages/beacon-node/src/metrics/metrics/lodestar.ts b/packages/beacon-node/src/metrics/metrics/lodestar.ts index 130ea290784c..8b55faa83c55 100644 --- a/packages/beacon-node/src/metrics/metrics/lodestar.ts +++ b/packages/beacon-node/src/metrics/metrics/lodestar.ts @@ -110,10 +110,10 @@ export function createLodestarMetrics( help: "Current count of pending items in reqRespBridgeReqCaller data structure", }), }, - networkWorkerWireEventsOnMainThreadLatencySec: register.histogram<"eventName" | "eventDirection">({ + networkWorkerWireEventsOnMainThreadLatencySec: register.histogram<"eventName">({ name: "lodestar_network_worker_wire_events_on_main_thread_latency", help: "Latency to transmit network events to main thread across worker port", - labelNames: ["eventName", "eventDirection"], + labelNames: ["eventName"], buckets: [0.001, 0.003, 0.01, 0.03, 0.1], }), diff --git a/packages/beacon-node/src/network/core/metrics.ts b/packages/beacon-node/src/network/core/metrics.ts index 9e7c8d7f5137..7bddeafbe5c3 100644 --- a/packages/beacon-node/src/network/core/metrics.ts +++ b/packages/beacon-node/src/network/core/metrics.ts @@ -318,10 +318,10 @@ export function getNetworkCoreWorkerMetrics(register: RegistryMetricCreator) { name: "lodestar_network_worker_reqresp_bridge_caller_pending_count", help: "Current count of pending elements in respBridgeCaller", }), - networkWorkerWireEventsOnWorkerThreadLatencySec: register.histogram<"eventName" | "eventDirection">({ + networkWorkerWireEventsOnWorkerThreadLatencySec: register.histogram<"eventName">({ name: "lodestar_network_worker_wire_events_on_worker_thread_latency", help: "Latency to transmit network events to worker thread across parent port", - labelNames: ["eventName", "eventDirection"], + labelNames: ["eventName"], buckets: [0.001, 0.003, 0.01, 0.03, 0.1], }), }; diff --git a/packages/beacon-node/src/util/workerEvents.ts b/packages/beacon-node/src/util/workerEvents.ts index 37904f84b34a..a839a1c0b61c 100644 --- a/packages/beacon-node/src/util/workerEvents.ts +++ b/packages/beacon-node/src/util/workerEvents.ts @@ -43,10 +43,7 @@ export function wireEventsOnWorkerThread( const [sec, nanoSec] = process.hrtime(data.posted); const networkWorkerLatency = sec + nanoSec / 1e9; metrics?.networkWorkerWireEventsOnWorkerThreadLatencySec.observe( - { - eventName: data.event as string, - eventDirection: "mainToWorker", - }, + {eventName: data.event as string}, networkWorkerLatency ); // logger.trace("network worker message latency", networkWorkerLatency); @@ -89,10 +86,7 @@ export function wireEventsOnMainThread( const [sec, nanoSec] = process.hrtime(data.posted); const networkWorkerLatency = sec + nanoSec / 1e9; metrics?.networkWorkerWireEventsOnMainThreadLatencySec.observe( - { - eventName: data.event as string, - eventDirection: "workerToMain", - }, + {eventName: data.event as string}, networkWorkerLatency ); // logger.trace("network worker message latency", networkWorkerLatency);