Skip to content
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

Expose libp2p metrics and bandwidth stats for libp2p protocols #2056

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hsanjuan
Copy link
Collaborator

@hsanjuan hsanjuan commented May 11, 2024

This has two parts:

  • First, wire in libp2p metrics into the prometheus endpoint. They do not include per-protocol bandwidth metrics but it should have been nevertheless exposed and it was an oversight that it wasn't there.
  • Second: add a health/bandwidth endpoint that reports bandwidth stats as given by GetBandwidthByProtocol(). Contains server/client and tests.

ipfs-cluster-ctl health bandwidth can be used to display the stats in a prettified way.

@hsanjuan hsanjuan added this to the Release v1.1.1 milestone May 11, 2024
@hsanjuan hsanjuan self-assigned this May 11, 2024
With the following commit we are adding a new health/bandwidth endpoint which
reports metrics stats coming from libp2p's bandwidth counter.

Unfortunately, we need to pass around the bandwidth counter in some way, so
wiring these stats requires providing the reporter during NewCluster() etc.

When set to nil no stats will be returned (even though it still happens as it
goes into the libp2p host configuration by default).
This adds support for health/bandwidth to the restapi.Client and
ipfs-cluster-ctl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant