Skip to content

Commit

Permalink
fix(metrics): remove eventDirection label
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Jul 27, 2023
1 parent 266f873 commit 242eb94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/beacon-node/src/metrics/metrics/lodestar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
}),

Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/network/core/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
}),
};
Expand Down
10 changes: 2 additions & 8 deletions packages/beacon-node/src/util/workerEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ export function wireEventsOnWorkerThread<EventData>(
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);
Expand Down Expand Up @@ -89,10 +86,7 @@ export function wireEventsOnMainThread<EventData>(
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);
Expand Down

0 comments on commit 242eb94

Please sign in to comment.