Configure your browser-based libp2p node with DevTools metrics:

import { createLibp2p } from 'libp2p'
import { devToolsMetrics } from '@libp2p/devtools-metrics'

const node = await createLibp2p({
metrics: devToolsMetrics()
})

Then use the DevTools plugin for Chrome or Firefox to inspect the state of your running node.

References

Re-exports DevToolsEvents
Re-exports DevToolsRPC
Re-exports MetricsRPC
Re-exports Peer
Re-exports PeerAddress
Re-exports valueCodecs