Skip to content

Add Kademlia stats logging for subspace-networking crates.#2280

Merged
nazar-pc merged 1 commit intomainfrom
extended-kademlia-logging
Nov 30, 2023
Merged

Add Kademlia stats logging for subspace-networking crates.#2280
nazar-pc merged 1 commit intomainfrom
extended-kademlia-logging

Conversation

@shamil-gadelshin
Copy link
Contributor

This PR periodical adds logging of the Kademlia buckets (total known peer number and number of peers without addresses).

Code contributor checklist:

@shamil-gadelshin shamil-gadelshin added the networking Subspace networking (DSN) label Nov 30, 2023
@shamil-gadelshin shamil-gadelshin self-assigned this Nov 30, 2023
Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

Do you really need to print it though? I think this should be a metric instead. I hope we can remove handle_periodic_tasks completely at some point and make it reactive instead as it should be.

@shamil-gadelshin
Copy link
Contributor Author

Do you really need to print it though? I think this should be a metric instead. I hope we can remove handle_periodic_tasks completely at some point and make it reactive instead as it should be.

It's helpful to have this in the log to understand how the process goes. As to metrics, they are also helpful. Let me know what metrics do you lack and we will start accumulating those (with subspace_ prefix). I would do that in a separate PR though.

@nazar-pc
Copy link
Member

I mean these parameters should probably be metrics in the first place, same for "Current connections and limits" and they should be updated as changes happen, not once every few seconds.

Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

Okay, I don't this is blocking, let's consider metrics as a future upgrade

@nazar-pc nazar-pc enabled auto-merge November 30, 2023 14:39
@nazar-pc nazar-pc added this pull request to the merge queue Nov 30, 2023
Merged via the queue into main with commit 9766c32 Nov 30, 2023
@nazar-pc nazar-pc deleted the extended-kademlia-logging branch November 30, 2023 16:02
@nazar-pc nazar-pc mentioned this pull request Apr 15, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

networking Subspace networking (DSN)

Projects

Development

Successfully merging this pull request may close these issues.

2 participants