service-worker-gateway
service-worker-gateway copied to clipboard
feat: perf measuring via onProgress events
We should do some exploratory work to investigate how we can get timing for events based on onProgress events.
To do this, we will likely need to configure some 'start' and 'end' events for various processes (networked-storage:findProviders:start, *:end, etc...), and the log the timing somewhere, maybe push up to honeycomb or other service.
- [ ] Collate list of start/end events and confirm with team these are good events to start collecting timings for
Two options in regards of interface:
- OpenTelemetry / Prometheus / Trace Contexts (which we use in Go/Boxo/Rainbow)
- return trace info in Server Timing header, main benefit that there is UI in browser dev tools already (mdn docs, gui examples)
For high level the Server-Timing header gives us immediatelly useful UI in browser devtools:
Note that we can get some libp2p timings with the changes from https://github.com/libp2p/js-libp2p/pull/2899 and https://github.com/libp2p/js-libp2p/pull/2898
