Skip to content

Conversation

@trinhdn2
Copy link

@trinhdn2 trinhdn2 commented Jan 24, 2024

Prerequisite

Checklist

  • Measures the Snappy compressed wire traffic belonging to individual subprotocols, down to the message type level.
  • Adds metrics for the p2p dialer, which gives us visibility into the quality of the dial candidates given to us by our discovery methods.
  • Adds similar to p2p/metrics metered connection for discover module. The aim is to have more detailed information about network usage which currently isn't tracked for discV4.

Added metrics:

  • discover/bucket/{index}/count - the number of nodes in bucket index
  • p2p/{ingress|egress}/eth/{version}/{msgCode} - message type level metrics from eth62, eth63
  • p2p/peers - active peer gauge
  • p2p/serves - serve meter
  • p2p/serves/success - serve success meter
  • 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

Example of new metrics under prometheus format:

p2p_dials 8

p2p_dials_error_connection 8

p2p_dials_error_id_unexpected 0

p2p_dials_error_known 0

p2p_dials_error_rlpx_enc 0

p2p_dials_error_rlpx_proto 0

p2p_dials_error_saturated 0

p2p_dials_error_self 0

p2p_dials_error_useless 0

p2p_dials_success 0

p2p_egress 8504

p2p_egress_eth_63_0x00 292

p2p_egress_eth_63_0x00_packets 4

p2p_egress_eth_63_0x02 2040

p2p_egress_eth_63_0x02_packets 12

p2p_egress_eth_63_0x03 62

p2p_egress_eth_63_0x03_packets 5

p2p_egress_eth_63_0x07 4142

p2p_egress_eth_63_0x07_packets 4

p2p_handle_eth_63_0x02_count 12

p2p_handle_eth_63_0x02 {quantile="0.5"} 467
p2p_handle_eth_63_0x02 {quantile="0.75"} 997.75
p2p_handle_eth_63_0x02 {quantile="0.95"} 1896
p2p_handle_eth_63_0x02 {quantile="0.99"} 1896
p2p_handle_eth_63_0x02 {quantile="0.999"} 1896
p2p_handle_eth_63_0x02 {quantile="0.9999"} 1896

p2p_handle_eth_63_0x04_count 5

p2p_handle_eth_63_0x04 {quantile="0.5"} 29
p2p_handle_eth_63_0x04 {quantile="0.75"} 727.5
p2p_handle_eth_63_0x04 {quantile="0.95"} 1340
p2p_handle_eth_63_0x04 {quantile="0.99"} 1340
p2p_handle_eth_63_0x04 {quantile="0.999"} 1340
p2p_handle_eth_63_0x04 {quantile="0.9999"} 1340

p2p_handle_eth_63_0x07_count 7

p2p_handle_eth_63_0x07 {quantile="0.5"} 105
p2p_handle_eth_63_0x07 {quantile="0.75"} 492
p2p_handle_eth_63_0x07 {quantile="0.95"} 1939
p2p_handle_eth_63_0x07 {quantile="0.99"} 1939
p2p_handle_eth_63_0x07 {quantile="0.999"} 1939
p2p_handle_eth_63_0x07 {quantile="0.9999"} 1939

p2p_ingress 11089

p2p_ingress_eth_63_0x00 292

p2p_ingress_eth_63_0x00_packets 4

p2p_ingress_eth_63_0x02 2040

p2p_ingress_eth_63_0x02_packets 12

p2p_ingress_eth_63_0x04 2490

p2p_ingress_eth_63_0x04_packets 5

p2p_ingress_eth_63_0x07 6321

p2p_ingress_eth_63_0x07_packets 7

p2p_peers 4

p2p_serves 4

p2p_serves_success 4

References:

@trinhdn2 trinhdn2 closed this by deleting the head repository Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants