ipfs / go-bitswap

The golang implementation of the bitswap protocol
MIT License
216 stars 112 forks source link

feat: add basic tracing #562

Closed guseggert closed 2 years ago

guseggert commented 2 years ago

This adds tracing spans to the costly Bitswap entry points. It doesn't instrument the bitswap internals, which will take some time. In go-ipfs, this will at least let us know the contribution of Bitswap to the overall request handling time.

This also plumbs contexts through internally so that they reach the content routing APIs, so that traces are propagated through and we can start instrumenting e.g. the DHT.

iand commented 2 years ago

Are test failures related to this change?

guseggert commented 2 years ago

Yes, I need to fix them, meant to open this as a draft until I work those out

guseggert commented 2 years ago

OK it's good to go now, the remaining test failures are known flaky tests documented in https://github.com/ipfs/go-libipfs/issues/86

iand commented 2 years ago

LGTM