Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

WIP: Feat/logging and docs #57

Closed
wants to merge 6 commits into from
Closed

Conversation

hannahhoward
Copy link
Contributor

Goals

Make Bitswap more pleasant to work with through better logging and some docs that illustrate how it works

Implementation

  • Add a UML activity diagram in PlantUML that tracks the various stages of operations in Bitswap through which it wants & receives blocks in the context of sessions
  • Add tracing to bitswap, currently via go-log, but likely to change very soon (before merge)
  • Since tracing infrastructure is not yet in place, add a temporary wrapper on go-log to log trace messages as structured json in the regular log (that is conveniently compatible with existing ContextWithLoggable calls in IPFS itself)
  • Add logs to sessions that output all of the key events so that you can see when each happens, along with lots of metadata about the session and other things happening in it

For discussion

WIP - Do not merge - will change as soon ipfs/kubo#5783 gets closer to merge w/ work from @lanzafame -- not going to use go-log among other things

fix ipfs/boxo#100

Add a simplified diagram that shows how blocks are fetched in sessions
- Build a wrapper around logs to output tracing messages to logs when
needed
- Remove deprecated calls to Event/EventBegin
- Add tracing to GetBlocks
Sets up wrapped logger so file lines are still printed correctly
- Logging for all the various stages of a session
@ghost ghost assigned hannahhoward Jan 17, 2019
@ghost ghost added the status/in-progress In progress label Jan 17, 2019
@ghost ghost removed the status/in-progress In progress label Feb 6, 2019
@hannahhoward
Copy link
Contributor Author

Will re-examine when the Gateway Team is farther along

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ipfs/go-bitswap] Improve bitswap debug logging
1 participant