gno icon indicating copy to clipboard operation
gno copied to clipboard

feat: add more telemetry

Open zivkovicmilos opened this issue 1 year ago • 2 comments
trafficstars

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

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
Contributors' checklist...
  • [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, if any. More info here.

zivkovicmilos avatar May 08 '24 18:05 zivkovicmilos

Codecov Report

Attention: Patch coverage is 17.51825% with 226 lines in your changes are missing coverage. Please review.

Project coverage is 48.98%. Comparing base (c6cde63) to head (416819a).

Files Patch % Lines
tm2/pkg/telemetry/metrics/metrics.go 0.00% 123 Missing :warning:
gno.land/pkg/sdk/vm/handler.go 0.00% 29 Missing :warning:
tm2/pkg/bft/rpc/lib/server/handlers.go 9.67% 26 Missing and 2 partials :warning:
gno.land/pkg/sdk/vm/keeper.go 64.28% 15 Missing :warning:
tm2/pkg/bft/consensus/state.go 28.57% 10 Missing :warning:
tm2/pkg/telemetry/init.go 0.00% 8 Missing :warning:
tm2/pkg/bft/mempool/clist_mempool.go 41.66% 7 Missing :warning:
tm2/pkg/p2p/switch.go 50.00% 4 Missing :warning:
gno.land/cmd/gnoland/start.go 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2059      +/-   ##
==========================================
- Coverage   49.14%   48.98%   -0.17%     
==========================================
  Files         576      576              
  Lines       77616    77736     +120     
==========================================
- Hits        38148    38078      -70     
- Misses      36377    36568     +191     
+ Partials     3091     3090       -1     
Flag Coverage Δ
gno.land 61.38% <36.98%> (-0.31%) :arrow_down:
misc/autocounterd 0.00% <ø> (ø)
misc/genproto 0.00% <ø> (ø)
misc/genstd 73.90% <ø> (ø)
misc/goscan 0.00% <ø> (ø)
misc/logos 17.38% <ø> (ø)
misc/loop 0.00% <ø> (ø)
tm2 54.53% <10.44%> (-0.23%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 08 '24 18:05 codecov[bot]

please watch https://github.com/gnolang/gno/pull/2032

albttx avatar May 09 '24 09:05 albttx