[#263] Resolve "monitor message lag (in signalboost)"
Closes #263 (closed)
context
- motivation: we want a running top-of-the-stack measure of how long it takes to send messages so that we can measure whether perf improvements have an impact on decreasing message lag
- notes on things i changed since spec'ed:
- i renamed this metric to "metric roundtrip" since it more accurately names what we are measuring (to measure "lag" we'd want to subtract healthy roundtrip time from observed. that's different!)
- after inspecting docs on gauge, i realized it's sort of flawed for what we're trying to do. left notes on why i think that, and added a histogram
changes
- record
whenSent
in state when registering callback, subtract whenSent from current time in callback handler to derrive round trip time - for now, record metric in both histogram and (likely flawed) gauge so we can see what yields most useful data (but note why gauge approach seems flawed)
side-effects
- restore prometheus/grafana containers to dev docker compose (note: it would be nice to have a "quiet" option that excludes them!)
- leave localdev network available in comments for running tests behind VPN (pending a solution that would work both for dev and gitlab CI runner...)