Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tm2] Node Metrics #1829

Closed
zivkovicmilos opened this issue Mar 25, 2024 · 0 comments · Fixed by #2059
Closed

[tm2] Node Metrics #1829

zivkovicmilos opened this issue Mar 25, 2024 · 0 comments · Fixed by #2059
Assignees
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related

Comments

@zivkovicmilos
Copy link
Member

Description

This effort covers the need to introduce extensive metrics tracking capabilities for critical modules in Tendermint2 / Gno as a whole.

Currently, there is no metrics support in the form of Prometheus or other standards which can be used to continuously monitor active Gno nodes.

A good foundation has been set already with #1762

Suggestions for possible metrics collection areas:

  • Consensus

    • Block interval (time between current and prev block)
    • Number of transactions
    • Block gas used
    • Block gas limit
    • Number of validators
    • Number of rounds to reach consensus (implementation specific)
  • Networking

    • number of inbound peers
    • number of outbound peers
    • number of pending inbound peers
    • number of pending outbound peers
    • bytes gossiped (ex. for consensus)
  • Syncer

    • number of blocks synced
    • number of block txs
    • number of block receipts
  • JSON-RPC

    • response time for requests
    • error count when handling request
  • Mempool

    • number of free mempool slots used (implementation specific)
    • number of initialized mempool accounts (implementation specific)
  • VM

    • gas used per execution
    • number of processed transactions

Successful outcomes of this effort:

  • A user can tap into Prometheus / whatever standard metrics for their Gno node
  • A user can display these metrics on a dashboard like Grafana
  • Ongoing test-nets / main-nets have clear metrics dashboards the core team can use
@zivkovicmilos zivkovicmilos added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Mar 25, 2024
@Kouteki Kouteki moved this from Backlog to Todo in 🧙‍♂️gno.land core team Apr 2, 2024
@zivkovicmilos zivkovicmilos self-assigned this May 8, 2024
@zivkovicmilos zivkovicmilos moved this from Todo to In Progress in 🧙‍♂️gno.land core team May 8, 2024
zivkovicmilos added a commit that referenced this issue May 24, 2024
## Description

Closes #1829

This PR introduces new metrics for different TM2 modules, as outlined in
#1829.

Thank you @gfanton and @ajnavarro for helping out with the Docker issues
🙏

## How do I test this out?

Head over to `misc/telemetry` and follow the README -- you can run
everything locally in Docker 😎


![grafana-2](https://github.com/gnolang/gno/assets/16712663/8177d338-6743-480d-b4b3-b447243043d9)


cc @mazzy89 

## Metrics added
### Consensus

- [x] block interval (time between current and prev block in seconds)
- [x] number of transactions in the latest block
- [x] block size (in bytes)
- [x] number of validators
- [x] total voting power of the validator set

### Networking

- [x] number of inbound peers
- [x] number of outbound peers
- [x] number of pending peers (dialing) 

### JSON-RPC

- [x] response time for requests (http / ws)

### Mempool

- [x] number of valid txs in the mempool
- [x] number of txs in the mempool cache

### VM

- [x] gas used per execution
- [x] CPU cycles
- [x] different VM query message call frequency
- [x] different VM execution frequency (run, call, addpkg)
- [x] VM query error frequency

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>

---------

Signed-off-by: gfanton <[email protected]>
Co-authored-by: gfanton <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress to Done in 🧙‍♂️gno.land core team May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related
Projects
Development

Successfully merging a pull request may close this issue.

1 participant