-
Notifications
You must be signed in to change notification settings - Fork 446
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
Per-component metrics #1060
Comments
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.
I think this is super valuable! For further iteration, we should look into getting this closer to what we want to have with https://github.com/libp2p/observer-toolkit/tree/master/packages/proto On previous hack week, I did a small POC in the daemon libp2p/js-libp2p-daemon#45 and I think this will likely be something we want to use in the daemon. But, there are useful things that we should extract on the libp2p repo that would make easier to consume things in IPFS and the observer toolkit |
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.
I'd like to get some insight into what's going on inside a libp2p node. At the moment the metrics are a bit limited, only focussing on bandwidth stats for peers and protocols and few other bits, from what I can see.
It would be really useful to be able to get component-specific metrics to really see what's going on.
How about something like:
This would set per-component metrics, eg:
Then getting metrics out:
We'd then report these metrics in the
/debug/metrics/prometheus
endpoint inipfs-http-api-server
which would allow graphing these stats over time whenIPFS_MONITORING
is set in the environment similar to how we do with the number of connected peers.I don't think we need moving averages, or anything fancy like that - the tool we use to examine the stats can figure all of that out.
The text was updated successfully, but these errors were encountered: