mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-16 07:30:51 +00:00
Implements the idea from #1060 - allows us to get some insight into what's happening in a libp2p node out side of just bandwidth stats. Configures a few default metrics if metrics are enabled - current connections, the state of the dial queue, etc. Also makes the `Metrics` class not depend on the `ConnectionManager` class, otherwise we can't collect simple metrics from the connection manager class due to the circular dependency.