ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

Add prometheus to client and begin implementing custom metrics

Open am1r021 opened this issue 1 year ago • 1 comments

This PR begins the Prometheus integration work by first adding a Prometheus client server to the ethereumjs client and then adding custom metrics discussed in #3089.

am1r021 avatar Feb 17 '24 03:02 am1r021

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.93%. Comparing base (4be68d2) to head (961afba). Report is 9 commits behind head on master.

:exclamation: Current head 961afba differs from pull request most recent head 39d1daa. Consider uploading reports for the commit 39d1daa to get more accurate results

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.34% <ø> (+6.10%) :arrow_up:
blockchain 91.61% <ø> (+0.68%) :arrow_up:
client ?
common 98.25% <ø> (+4.23%) :arrow_up:
devp2p 82.12% <ø> (+0.75%) :arrow_up:
ethash ∅ <ø> (?)
evm 74.33% <ø> (+1.03%) :arrow_up:
genesis 99.98% <ø> (ø)
statemanager 77.02% <ø> (+2.30%) :arrow_up:
trie 89.29% <ø> (+29.69%) :arrow_up:
tx 95.45% <ø> (+9.74%) :arrow_up:
util 89.13% <ø> (+7.81%) :arrow_up:
vm 80.20% <ø> (+18.64%) :arrow_up:
wallet 88.35% <ø> (+1.10%) :arrow_up:

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

codecov[bot] avatar Feb 17 '24 03:02 codecov[bot]

Changes I have made to the original PR

  • Add a new CLI flag for prometheusPort
  • Moved prometheusMetrics to a new optional property on the config object that is passed around within the client. This should make for less repetitive code when we add new metrics in other places within the client
  • Add better typing to stopClient parameters in bin/cli.ts
  • Add minimal docs for how to start metrics server

acolytec3 avatar Apr 17 '24 14:04 acolytec3