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

feat(p2p/dht): Enable DHT server metrics #4071

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

crStiv
Copy link

@crStiv crStiv commented Jan 26, 2025

Description:

This PR implements DHT server metrics to track server load and performance. Added metrics include:

Key metrics:

  • peers_total: Total number of connected peers
  • requests_total: Total number of DHT requests by type
  • request_duration_seconds: Duration of DHT requests
  • routing_table_size: Size of routing table
  • stored_records_total: Total number of stored records

All metrics are available via Prometheus endpoint with celestia_dht_ prefix and include network/node_type labels.

Closes #4066

@github-actions github-actions bot added the external Issues created by non node team members label Jan 26, 2025
@walldiss
Copy link
Member

walldiss commented Jan 27, 2025

Hey @crStiv! Thank you for taking this one! I see that you made wrappers and implemented metrics manually. Could you please consider using metrics that are already implemented inside libp2p/kad-dht pkg? You would need to plug them to our metrics collector

@crStiv
Copy link
Author

crStiv commented Jan 30, 2025

Hey @crStiv! Thank you for taking this one! I see that you made wrappers and implemented metrics manually. Could you please consider using metrics that are already implemented inside libp2p/kad-dht pkg? You would need to plug them to our metrics collector

Hi Vlad, I've updated dht.go, does it seem good for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Issues created by non node team members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(p2p/dht): Enable dht server metrics
2 participants