Track protocol stream open/close count in metrics
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 546
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 16
Description
Current metrics include `libp2p_protocol_streams_total` which is a guage of current open protocol streams (with a single label protocol=`direction + " " + protocol`)
It would be more useful to have separate _counter_ metrics for stream open and stream close. This would allow us to compute total (open - close) as well as rates of open and close.
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
Search the TypeScript source for the libp2p_protocol_streams_total metric and the code that records protocol stream opens and closes. Review the existing metric tests, if present, before changing behavior. Done means separate open and close counters expose protocol and direction labels and support calculating current totals and open/close rates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100