Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement of relay related metrics; remove relay clients if we have no more connections #2767

Merged
merged 6 commits into from
Feb 21, 2025

Conversation

RolandSherwin
Copy link
Member

@RolandSherwin RolandSherwin commented Feb 20, 2025

  • Remove relay clients from the SwarmDriver::connected_relay_clients tracker if the Reservation has been closed. This happens when all the connection with the relay client has been lost. Libp2p does not have an event for this yet, so we have to do a manual check for this.
  • Calculate the peers_in_rt value directly from the kbuckets instead of acting upon the libp2p events. The latter gave incorrect values, and it is very prone to errors, as everyone should be careful to call the update fn everytime we manually remove a peer from the RT.
  • Add connected_relay_clients metric.
  • Add relay_peers_in_routing_table, peers_in_non_full_buckets, relay_peers_in_non_full_buckets and percentage_of_relay_peers metrics.

@maqi maqi changed the title fix(relay): remove relay clients if we have no more connections improvement of relay related metrics; remove relay clients if we have no more connections Feb 20, 2025
@jacderida jacderida merged commit 74ea969 into maidsafe:rc-2025.1.2-hotfix1 Feb 21, 2025
23 checks passed
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.

3 participants