Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Conversation

@huyngopt1994
Copy link
Contributor

@huyngopt1994 huyngopt1994 commented Jun 9, 2024

Referenced by ethereum/go-ethereum#27621 and ethereum/go-ethereum#27008

Description
This PR adds metrics for

  • The p2p dialer, which gives us visibility into the quality of the dial candidates given to us by our discovery methods ( Healthy of dial connections for showing failure related to multitude of reasons: wrong chain, too many peers, etc.)
  • Trafic metrics for discV4 and discV5 related to network usage.

Added Metrics

  • discover/bucket/{index}/count - the number of nodes in bucket index
  • eth/protocols/eth/{ingress|egress}/handshake/error/peer - unexpected peer behavior
  • eth/protocols/eth/{ingress|egress}/handshake/error/timeout - handshake timeout
  • eth/protocols/eth/{ingress|egress}/handshake/error/network - wrong network id
  • eth/protocols/eth/{ingress|egress}/handshake/error/version - wrong protocol version
  • eth/protocols/eth/{ingress|egress}/handshake/error/genesis - wrong genesis
  • eth/protocols/eth/{ingress|egress}/handshake/error/forkid - wrong forkid
  • eth/protocols/snap/{ingress|egress}/registration/error - error registering snap protocol (usually snap, but no eth)
  • p2p/dials/success - the total number of dials that result in a peer being added to the peerset
  • p2p/dials/error/connection - unable to initiate TCP connection to target
  • p2p/dials/error/saturated - local client is already connected to its maximum number of peers
  • p2p/dials/error/known - dialing an already connected peer
  • p2p/dials/error/self - dialing the local node's id
  • p2p/dials/error/useless - dialing a peer that doesn't share an capabilities with the local node
  • p2p/dials/error/id/unexpected - dialed peer repsoned with different id than expected
  • p2p/dials/error/rlpx/enc - error negotiating the rlpx encryption during dial
  • p2p/dials/error/rlpx/proto - error during rlpx protocol handshake`

discv4 only (Example)
image

@huyngopt1994 huyngopt1994 changed the title [WIP]p2p,eth: add dial and eth handshakes metrics p2p,eth: add dial and eth handshakes metrics Jun 9, 2024
@huyngopt1994 huyngopt1994 changed the title p2p,eth: add dial and eth handshakes metrics p2p,eth: add dial, eth handshakes and traffic metrics Jun 10, 2024
Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
@huyngopt1994 huyngopt1994 merged commit 75b849d into axieinfinity:master Jun 13, 2024
@huyngopt1994 huyngopt1994 deleted the p2p/add-more-dial-metrics branch June 13, 2024 05:08
andicrypt pushed a commit to andicrypt/ronin that referenced this pull request Aug 14, 2024
* p2p,eth: add dial and eth handshakes metrics

* p2p/discover: add bucket metrics to discovery

* p2p/discover: change guage to counter

* p2p/discover: simplify table metrics tracking

* p2p/discover: add traffic metrics (#27008)

Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>

---------

Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants