epic: expose transport metrics
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 546
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 16
Description
## Done Criteria
1. Export metrics leveraging the work done in https://github.com/libp2p/js-libp2p/issues/1458
2. Transport metrics, similar to those already created for TCP, are emitted for all js-libp2p transports
## Motivation
Epic created since we only had one tracking the work from https://github.com/libp2p/js-libp2p/issues/1915
Better observability for performance and benchmarking. See: https://github.com/libp2p/js-libp2p/issues/1458#issuecomment-1323833476
## Questions
- [ ] Do we want to add metrics to `packages/transport-circuit-relay-v2`?
## Related
* https://github.com/libp2p/js-libp2p/issues/1915
* https://github.com/libp2p/js-libp2p/pull/2649#discussion_r1716665370
* https://github.com/libp2p/js-libp2p/issues/2077
* https://github.com/libp2p/js-libp2p/issues/2080
* https://github.com/libp2p/js-libp2p/issues/2099
```[tasklist]
### Tasks
- [ ] https://github.com/libp2p/js-libp2p/issues/1915
- [ ] feat: expose metrics for WebTransport
- [ ] feat: expose metrics for WebRTC
- [ ] feat: expose metrics for maconn upgrades in @libp2p/upgrader (part of `libp2p` npm package: https://github.com/libp2p/js-libp2p/blob/7939dbd5cbab1c7b4be671ff976d0258e9b48178/packages/libp2p/src/upgrader.ts#L126C36-L126C52)
```
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 issue 1915 and the existing TCP transport metrics work. Then inspect packages/libp2p/src/upgrader.ts at the linked entry point and the transport packages named in the task list, including WebTransport, WebRTC, and packages/transport-circuit-relay-v2. Done means metrics are exposed for the agreed transports and the open task list is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100