misc/metrics: Expose bytes send/received per protocol
Open
Nobody has claimed this yet.
difficulty:moderate
help wanted
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Description
Expose Prometheus metrics counting the number of bytes send and received on streams per protocol.
Rough idea:
libp2p_bytes { direction = "in", protocol = "/ipfs/kad/1.0.0" } 42
libp2p_bytes { direction = "out", protocol = "/ipfs/kad/1.0.0" } 42
Motivation
Allows us to get an intuition of the bandwidth consumption of each of the libp2p protocols.
Requirements
- Use https://github.com/libp2p/rust-libp2p/pull/3261
- Implement
Collectortrait from https://github.com/prometheus/client_rust/pull/82
Open questions
Are you planning to do it yourself in a pull request?
Not any time soon. Help is much appreciated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing rust-libp2p pull request 3261 and the prometheus client_rust Collector trait pull request 82. Trace how stream traffic is associated with protocols, then ensure the completed work exposes separate inbound and outbound byte counts for each protocol as Prometheus metrics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- prometheus, rust
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100