-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add metrics configuration (#468)
* docs: add metrics configuration * docs: rollkit metrics * docs: centralized sequencer page * docs: centralized sequencer metrics * docs: typo * docs: clarify config file; rewrite * doc: review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * docs: add to menu * docs: sidebar; heading * docs: fix config file path * docs: centralized sequencer metrics * docs: centralized-sequencer fmt * docs: centralized sequencer flags --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8c1d255
commit dad10ef
Showing
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### Centralized Sequencer Node | ||
|
||
The `centralized-sequencer` node implements a pluggable centralized sequencer scheme. It can be configured using the following flags: | ||
|
||
| Flag | Usage | Default | | ||
|------------------------------|------------------------------------------------------------------|------------------------------| | ||
| `batch-time` | Time in seconds to wait before generating a new batch | `2` seconds | | ||
| `da_address` | DA address | `http://localhost:26658` | | ||
| `da_auth_token` | Auth token for the DA | `""` | | ||
| `da_namespace` | DA namespace where the sequencer submits transactions | `""` | | ||
| `host` | Centralized sequencer host | `localhost` | | ||
| `port` | Centralized sequencer port | `50051` | | ||
| `listen-all` | Listen on all network interfaces (0.0.0.0) instead of just localhost | disabled | | ||
| `metrics` | Enable Prometheus metrics | disabled | | ||
| `metrics-address` | Address to expose Prometheus metrics | `":8080"` | | ||
|
||
See `centralized-sequencer --help` for details. | ||
|
||
The `centralized-sequencer` node reports Prometheus metrics when the `-metrics` flag is enabled. | ||
|
||
By default, metrics are exported to `http://localhost:8080/metrics`. | ||
|
||
The listening address and port can be configured with the `-metrics-address` flag. | ||
|
||
The following metrics are available: | ||
|
||
| **Name** | **Type** | **Tags** | **Description** | | ||
|-------------------------------------------|-----------|-----------|------------------------------------------------------------------------| | ||
| sequencer_gas_price | Gauge | | Gas price of the DA transaction | | ||
| sequencer_last_blob_size | Gauge | | Last blob size submitted to the DA | | ||
| sequencer_transaction_status | Gauge | | Transaction status of the DA transaction | | ||
| sequencer_num_pending_blocks | Gauge | | Number of blocks pending DA submission | | ||
| sequencer_included_block_height | Gauge | | Block height of the last DA transaction | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# How to configure metrics | ||
|
||
Rollkit can report and serve the Prometheus metrics, which in their turn can | ||
be consumed by Prometheus collector(s). | ||
|
||
This functionality is disabled by default. | ||
|
||
To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your | ||
CometBFT node's [config file](https://docs.cometbft.com/v0.38/core/configuration) | ||
located at `$CMTHOME/config/config.toml`. | ||
|
||
Metrics will be served under `/metrics` on 26660 port by default. | ||
The listening address (default: `localhost:26660`) can be changed in the config file using | ||
`instrumentation.prometheus_listen_addr`. | ||
|
||
## List of available metrics | ||
|
||
The following metrics are available, grouped by their subsystem: | ||
|
||
### ABCI | ||
|
||
| Name | Type | Tags | Description | | ||
|----------------------------------------------|-----------|-----------------------------|--------------------------------------------| | ||
| cometbft_abci_connection_method_timing_seconds | Histogram | chain_id, method, type | Timing for each ABCI method. | | ||
|
||
### sequencer | ||
|
||
| Name | Type | Tags | Description | | ||
|--------------------------------------|-------|----------|------------------------------| | ||
| cometbft_sequencer_height | Gauge | chain_id | Height of the chain. | | ||
| cometbft_sequencer_num_txs | Gauge | chain_id | Number of transactions. | | ||
| cometbft_sequencer_block_size_bytes | Gauge | chain_id | Size of the block. | | ||
| cometbft_sequencer_total_txs | Gauge | chain_id | Total number of transactions. | | ||
| cometbft_sequencer_latest_block_height | Gauge | chain_id | The latest block height. | | ||
|
||
### mempool | ||
|
||
| Name | Type | Tags | Description | | ||
|------------------------------------------|-----------|----------|--------------------------------------------------------------------------------| | ||
| cometbft_mempool_size | Gauge | chain_id | Size of the mempool (number of uncommitted transactions). | | ||
| cometbft_mempool_size_bytes | Gauge | chain_id | Total size of the mempool in bytes. | | ||
| cometbft_mempool_tx_size_bytes | Histogram | chain_id | Transaction sizes in bytes. | | ||
| cometbft_mempool_failed_txs | Counter | chain_id | Number of failed transactions. | | ||
| cometbft_mempool_rejected_txs | Counter | chain_id | Number of rejected transactions. | | ||
| cometbft_mempool_evicted_txs | Counter | chain_id | Number of evicted transactions. | | ||
| cometbft_mempool_recheck_times | Counter | chain_id | Number of times transactions are rechecked in the mempool. | | ||
|
||
### p2p | ||
|
||
| Name | Type | Tags | Description | | ||
|--------------------------------------|---------|---------------------|--------------------------------------------------| | ||
| cometbft_p2p_peers | Gauge | chain_id | Number of peers. | | ||
| cometbft_p2p_peer_receive_bytes_total| Counter | peer_id, chID | Number of bytes received from a given peer. | | ||
| cometbft_p2p_peer_send_bytes_total | Counter | peer_id, chID | Number of bytes sent to a given peer. | | ||
| cometbft_p2p_peer_pending_send_bytes | Gauge | peer_id | Pending bytes to be sent to a given peer. | | ||
| cometbft_p2p_num_txs | Gauge | peer_id | Number of transactions submitted by each peer. | | ||
| cometbft_p2p_message_receive_bytes_total | Counter | message_type | Number of bytes of each message type received. | | ||
| cometbft_p2p_message_send_bytes_total | Counter | message_type | Number of bytes of each message type sent. | | ||
|
||
In addition to these, [go-libp2p metrics](https://github.com/libp2p/go-libp2p/tree/master/dashboards) are exported as well. | ||
|
||
### state | ||
|
||
| Name | Type | Tags | Description | | ||
|--------------------------------------------|-----------|----------|--------------------------------------------------------------------------| | ||
| cometbft_state_block_processing_time | Histogram | chain_id | Time spent processing FinalizeBlock. | | ||
| cometbft_state_consensus_param_updates | Counter | chain_id | Number of consensus parameter updates returned by the application since process start. | | ||
|
||
## centralized-sequencer | ||
|
||
The `centralized-sequencer` has its own metrics and configuration, see the [centralized sequencer docs](guides/centralized-sequencer) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters