From 2a0c6254da25ad1d8cae744e5c103fe4accc1fc8 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Fri, 19 Jan 2024 12:52:03 +0000 Subject: [PATCH] fix: metric nomenclature --- src/domain/checkForAndPlaceOrder.ts | 4 ++-- src/utils/metrics.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/domain/checkForAndPlaceOrder.ts b/src/domain/checkForAndPlaceOrder.ts index 527e5ca..9945d51 100644 --- a/src/domain/checkForAndPlaceOrder.ts +++ b/src/domain/checkForAndPlaceOrder.ts @@ -32,7 +32,7 @@ import { import { ChainContext, SDK_BACKOFF_NUM_OF_ATTEMPTS } from "./chainContext"; import { pollingDurationSeconds, - pollingDurationSecondsByOwner, + pollingByOwnerDurationSeconds, pollingPostProcessingDurationSeconds, pollingOnChainDurationSeconds, activeOrdersTotal, @@ -109,7 +109,7 @@ export async function checkForAndPlaceOrder( // No guarantee is made that the order of the owners is the same over multiple blocks const ownerPromises = Array.from(ownerOrders.entries()).map( async ([owner, conditionalOrders]) => { - const ownerTimer = pollingDurationSecondsByOwner + const ownerTimer = pollingByOwnerDurationSeconds .labels(owner, chainId.toString(), blockNumber.toString()) .startTimer(); const log = getLogger( diff --git a/src/utils/metrics.ts b/src/utils/metrics.ts index dcd286b..3d5293d 100644 --- a/src/utils/metrics.ts +++ b/src/utils/metrics.ts @@ -147,8 +147,8 @@ export const pollingDurationSeconds = new client.Histogram({ labelNames: ["chain_id", "block"], }); -export const pollingDurationSecondsByOwner = new client.Histogram({ - name: "watch_tower_polling_duration_by_owner_seconds", +export const pollingByOwnerDurationSeconds = new client.Histogram({ + name: "watch_tower_polling_by_owner_duration_seconds", help: "Duration of polling run", labelNames: ["chain_id", "block", "owner"], });