-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 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]>
- Loading branch information
1 parent
c6cde63
commit 90aa89c
Showing
30 changed files
with
2,213 additions
and
166 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
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,11 @@ | ||
.PHONY: up | ||
up: | ||
docker compose up -d --build | ||
|
||
.PHONY: down | ||
down: | ||
docker compose down | ||
|
||
.PHONY: clean | ||
clean: | ||
docker compose down -v |
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,56 @@ | ||
## Overview | ||
|
||
The purpose of this Telemetry documentation is to showcase the different node metrics exposed by the Gno node through | ||
OpenTelemetry, without having to do extraneous setup. | ||
|
||
The containerized setup is the following: | ||
|
||
- Grafana dashboard | ||
- Prometheus | ||
- OpenTelemetry collector (separate service that needs to run) | ||
- Single Gnoland node, with 1s block times and configured telemetry (enabled) | ||
- Supernova process that simulates load periodically (generates network traffic) | ||
|
||
## Starting the containers | ||
|
||
### Step 1: Spinning up Docker | ||
|
||
Make sure you have Docker installed and running on your system. After that, within the `misc/telemetry` folder run the | ||
following command: | ||
|
||
```shell | ||
make up | ||
``` | ||
|
||
This will build out the required Docker images for this simulation, and start the services | ||
|
||
### Step 2: Open Grafana | ||
|
||
When you've verified that the `telemetry` containers are up and running, head on over to http://localhost:3000 to open | ||
the Grafana dashboard. | ||
|
||
Default login details: | ||
|
||
``` | ||
username: admin | ||
password: admin | ||
``` | ||
|
||
After you've logged in (you can skip setting a new password), on the left hand side, click on | ||
`Dashboards -> Gno -> Gno Node Metrics`: | ||
![Grafana](assets/grafana-1.jpeg) | ||
|
||
This will open up the predefined Gno Metrics dashboards (added for ease of use) : | ||
![Metrics Dashboard](assets/grafana-2.jpeg) | ||
|
||
Periodically, these metrics will be updated as the `supernova` process is simulating network traffic. | ||
|
||
### Step 3: Stopping the cluster | ||
|
||
To stop the cluster, you can run: | ||
|
||
```shell | ||
make down | ||
``` | ||
|
||
which will stop the Docker containers. Additionally, you can delete the Docker volumes with `make clean`. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
|
||
processors: | ||
batch: | ||
|
||
exporters: | ||
prometheus: | ||
endpoint: collector:8090 | ||
|
||
service: | ||
telemetry: | ||
logs: | ||
level: "debug" | ||
pipelines: | ||
metrics: | ||
receivers: [ otlp ] | ||
processors: [ batch ] | ||
exporters: [ prometheus ] |
Oops, something went wrong.