From f3ed2eac581075d23b1e8345c9f31d30aa80e75f Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Fri, 28 Jul 2023 14:11:07 +0700 Subject: [PATCH] fix: track new proposal duties detected --- packages/validator/src/metrics.ts | 5 +++++ packages/validator/src/services/blockDuties.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/validator/src/metrics.ts b/packages/validator/src/metrics.ts index fa9b4c720d03..e1890289bd36 100644 --- a/packages/validator/src/metrics.ts +++ b/packages/validator/src/metrics.ts @@ -236,6 +236,11 @@ export function getMetrics(register: MetricsRegister, gitData: LodestarGitData) help: "Total count of instances the proposer duties dependant root changed", }), + newProposalDutiesDetected: register.gauge({ + name: "vc_new_proposal_duties_detected_total", + help: "Total count of times new proposal duties were detected", + }), + // IndicesService indices: register.gauge({ diff --git a/packages/validator/src/services/blockDuties.ts b/packages/validator/src/services/blockDuties.ts index 65b98ce3b1f0..d22cc087714b 100644 --- a/packages/validator/src/services/blockDuties.ts +++ b/packages/validator/src/services/blockDuties.ts @@ -158,7 +158,7 @@ export class BlockDutiesService { if (additionalBlockProducers.length > 0) { this.notifyBlockProductionFn(currentSlot, additionalBlockProducers); this.logger.debug("Detected new block proposer", {currentSlot}); - this.metrics?.proposerDutiesReorg.inc(); + this.metrics?.newProposalDutiesDetected.inc(); } }