-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
prom.go
46 lines (42 loc) · 1.95 KB
/
prom.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package soltxm
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
// successful transactions
promSolTxmSuccessTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_success",
Help: "Number of transactions that are included and successfully executed on chain",
}, []string{"chainID"})
// inflight transactions
promSolTxmPendingTxs = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "solana_txm_tx_pending",
Help: "Number of transactions that are pending confirmation",
}, []string{"chainID"})
// error cases
promSolTxmErrorTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_error",
Help: "Number of transactions that have errored across all cases",
}, []string{"chainID"})
promSolTxmRevertTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_error_revert",
Help: "Number of transactions that are included and failed onchain",
}, []string{"chainID"})
promSolTxmRejectTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_error_reject",
Help: "Number of transactions that the RPC immediately rejected",
}, []string{"chainID"})
promSolTxmDropTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_error_drop",
Help: "Number of transactions that timed out during confirmation. Note: tx is likely dropped from the chain, but may still be included.",
}, []string{"chainID"})
promSolTxmSimRevertTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_error_sim_revert",
Help: "Number of transactions that reverted during simulation. Note: tx may still be included onchain",
}, []string{"chainID"})
promSolTxmSimOtherTxs = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "solana_txm_tx_error_sim_other",
Help: "Number of transactions that failed simulation with an unrecognized error. Note: tx may still be included onchain",
}, []string{"chainID"})
)