Skip to content

Commit

Permalink
PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Mar 13, 2024
1 parent a36660e commit ba42692
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions zetaclient/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})
Expand Down

0 comments on commit ba42692

Please sign in to comment.