IPFS Bitswap Monitoring

This expands on Debugging webnative traffic

Bitswap

This adds monitoring for IPFS Bitswap, which shows what peers request from your IPFS node.

And verbose mode:

Verbose mode shows CIDs that have already been requested, the # indicates the number of the repeating request (might be a request from a different peer).

How to enable

This is enabled by default on localhost and staging. On production you can go into the shared worker and type monitorBitswap() into the console. To enable verbose mode, pass true to that function call.

Not perfect

Note that this monitoring function is by no means perfect. It’s a loop that checks for new bitswap requests every 20ms, things might slip through the net.

2 Likes