Skip to content

Commit da44c0c

Browse files
saibatizokuminikin
andauthored
docs: Add description of the prometheus metrics used in jormungandr | NPG-000 (#583)
# Description Adds documentation for prometheus metrics. ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Oleksandr Prokhorenko <[email protected]>
1 parent d0f748a commit da44c0c

File tree

2 files changed

+146
-0
lines changed

2 files changed

+146
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Prometheus Metrics
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# `jormungandr` Prometheus Metrics
2+
3+
`jormungadr` uses Prometheus metrics to gather information about the node at runtime.
4+
5+
## Fragment Mempool Process
6+
7+
As the node receives fragments, they are inserted into the fragment mempool, and propagated into the peer network.
8+
9+
### `txRecvCnt`
10+
11+
>> tx_recv_cnt: IntCounter,
12+
13+
Total number of tx inserted and propagated by the mempool at each loop in the process.
14+
15+
### `txRejectedCnt`
16+
17+
>> tx_rejected_cnt: IntCounter,
18+
19+
Total number of tx rejected by the mempool at each loop in the process.
20+
21+
### `mempoolTxCount`
22+
23+
>> mempool_tx_count: UIntGauge,
24+
25+
Total number of tx in the mempool for a given block
26+
27+
### `mempoolUsageRatio`
28+
29+
>> mempool_usage_ratio: Gauge,
30+
31+
Mempool usage ratio for a given block
32+
33+
## Topology Process
34+
35+
As the node connects to peers, the network topology allows for gossip and p2p communication. Nodes can join or leave the network.
36+
37+
### `peerConnectedCnt`
38+
39+
>> peer_connected_cnt: UIntGauge,
40+
41+
The total number of connected peers.
42+
43+
### `peerQuarantinedCnt`
44+
45+
>> peer_quarantined_cnt: UIntGauge,
46+
47+
The total number of quarantined peers.
48+
49+
### `peerAvailableCnt`
50+
51+
>> peer_available_cnt: UIntGauge,
52+
53+
The total number of available peers.
54+
55+
### `peerTotalCnt`
56+
57+
>> peer_total_cnt: UIntGauge,
58+
59+
The total number of peers.
60+
61+
## Blockchain Process
62+
63+
Each node receives blocks streamed from the network which are processed in order to create a new block tip.
64+
65+
### `blockRecvCnt`
66+
67+
>> block_recv_cnt: IntCounter,
68+
69+
This is the total number of blocks streamed from the network that will be processed at each loop in the process.
70+
71+
## Blockchain Tip-Block Process
72+
73+
As the node sets the tip-block, this happens when the node is started and during the block minting process, these metrics are updated.
74+
75+
### `votesCasted`
76+
77+
>> votes_casted_cnt: IntCounter,
78+
79+
The total number accepted `VoteCast` fragments. Metric is incremented by the total number of valid `VoteCast` fragments
80+
in the block tip.
81+
82+
### `lastBlockTx`
83+
84+
>> // Total number of tx for a given block
85+
>> block_tx_count: IntCounter,
86+
87+
The total number of valid transaction fragments in the block tip.
88+
89+
### `lastBlockInputTime` <--- **misnomer**
90+
91+
>> block_input_sum: UIntGauge,
92+
93+
The total sum of transaction input values in the block tip. The `tx.total_input()` is added for every fragment.
94+
95+
### `lastBlockSum`
96+
97+
>> block_fee_sum: UIntGauge,
98+
99+
The total sum of transaction output values (fees) in the block tip. The `tx.total_output()` is added for every fragment.
100+
101+
### `lastBlockContentSize`
102+
103+
>> block_content_size: UIntGauge,
104+
105+
The total size in bytes of the sum of the transaction content in the block tip.
106+
107+
### `lastBlockEpoch`
108+
109+
>> block_epoch: UIntGauge,
110+
111+
The epoch of the block date defined in the block tip header.
112+
113+
### `lastBlockSlot`
114+
115+
>> block_slot: UIntGauge,
116+
117+
The slot of the block date defined in the block tip header.
118+
119+
### `lastBlockHeight`
120+
121+
>> block_chain_length: UIntGauge,
122+
123+
Length of the blockchain.
124+
125+
### `lastBlockDate`
126+
127+
>> block_time: UIntGauge,
128+
129+
Timestamp in seconds of the block date.
130+
131+
## Unused metrics
132+
133+
### `lastReceivedBlockTime`
134+
135+
>> slot_start_time: UIntGauge,
136+
137+
This metric is never updated.
138+
139+
## Unclear metrics
140+
141+
### `lastBlockHashPiece`
142+
143+
>> block_hash: Vec<UIntGauge>,
144+
145+
A vector of gauges that does something to with the block hash. Metric is updated when `http_response` is called.

0 commit comments

Comments
 (0)