Skip to content

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Apr 3, 2025

PR description

A new metric is exported with the count of peers by client type

# HELP besu_peers_peer_count_by_type The number of clients connected by client type
# TYPE besu_peers_peer_count_by_type gauge
besu_peers_peer_count_by_type{client="Besu"} 0.0
besu_peers_peer_count_by_type{client="Erigon"} 0.0
besu_peers_peer_count_by_type{client="Geth"} 5.0
besu_peers_peer_count_by_type{client="Nethermind"} 2.0
besu_peers_peer_count_by_type{client="Nimbus"} 0.0
besu_peers_peer_count_by_type{client="Reth"} 18.0
besu_peers_peer_count_by_type{client="Unknown"} 0.0

with it you can create graphs like this one
image

Fixed Issue(s)

fixes #8439

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 force-pushed the client-count-by-type-metrics branch from 9f8f560 to 524968e Compare April 4, 2025 08:38
Copy link
Contributor

@ahamlat ahamlat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, few comments related to naming bu not blocking, as in some way, it can be subjective.

@fab-10 fab-10 force-pushed the client-count-by-type-metrics branch from 59e1e25 to a3f0243 Compare April 4, 2025 13:28
fab-10 added 2 commits April 4, 2025 15:33
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the client-count-by-type-metrics branch from a3f0243 to 608b5bd Compare April 4, 2025 13:33
@fab-10 fab-10 changed the title Add metrics to report peer count by type Add metrics to report peer count by client Apr 4, 2025
@fab-10 fab-10 enabled auto-merge (squash) April 4, 2025 14:41
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the client-count-by-type-metrics branch from c80e3be to ff73f54 Compare April 4, 2025 14:43
@fab-10 fab-10 merged commit 409a0e2 into hyperledger:main Apr 4, 2025
43 checks passed
@fab-10 fab-10 deleted the client-count-by-type-metrics branch April 4, 2025 15:16
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.

Dashboard - Add metric to show client names of peers
2 participants