From ba42692493b87e21f35ada21587cceb7f66ad4af Mon Sep 17 00:00:00 2001 From: skosito Date: Wed, 13 Mar 2024 12:31:05 +0100 Subject: [PATCH] PR comment --- zetaclient/metrics/metrics.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/zetaclient/metrics/metrics.go b/zetaclient/metrics/metrics.go index a66ea8a40e..3325d21156 100644 --- a/zetaclient/metrics/metrics.go +++ b/zetaclient/metrics/metrics.go @@ -16,63 +16,65 @@ type Metrics struct { s *http.Server } +const ZetaClientNamespace = "zetaclient" + var ( PendingTxsPerChain = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "pending_txs_total", Help: "Number of pending transactions per chain", }, []string{"chain"}) GetFilterLogsPerChain = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "rpc_getFilterLogs_count", Help: "Count of getLogs per chain", }, []string{"chain"}) GetBlockByNumberPerChain = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "rpc_getBlockByNumber_count", Help: "Count of getLogs per chain", }, []string{"chain"}) TssNodeBlamePerPubKey = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "tss_node_blame_count", Help: "Tss node blame counter per pubkey", }, []string{"pubkey"}) HotKeyBurnRate = promauto.NewGauge(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "hotkey_burn_rate", Help: "Fee burn rate of the hotkey", }) NumberOfUTXO = promauto.NewGauge(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "utxo_number", Help: "Number of UTXOs", }) LastScannedBlockNumber = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "last_scanned_block_number", Help: "Last scanned block number per chain", }, []string{"chain"}) LastCoreBlockNumber = promauto.NewGauge(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "last_core_block_number", Help: "Last core block number", }) Info = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "info", Help: "Information about Zetaclient environment", }, []string{"version"}) LastStartTime = promauto.NewGauge(prometheus.GaugeOpts{ - Namespace: "zetaclient", + Namespace: ZetaClientNamespace, Name: "last_start_timestamp_seconds", Help: "Start time in Unix time", })