[Keep-web] Add metrics endpoint
Use same approach as keepstore metrics added in #13025 (prometheus, etc).Easiest metrics to provide:
- reqDuration (partitioned by method and status) using promhttp.InstrumentHandlerDuration
- timeToStatus (ditto) using log.AddHook, as in #13025
This should be refactored into a go package (sdk/go/httpserver?) instead of copying code from keepstore to keep-web.Keep-web specific metrics to provide:
- time to fetch block from keep
- cache hits, misses
#6 Updated by Peter Amstutz over 2 years ago
On the topic of metrics and health checks, we should add a page to the "Admin" section of documentation that describes which components have endpoints and how to use the health check aggregator. That would address the situation where no one remembers where we are with the project of implementing health checks / metrics, at least it would be written down.
#8 Updated by Tom Clegg over 2 years ago
13198-keep-web-metrics @ 0011b5236fc9a562bc13f943f9a431c496b2b7cd https://ci.curoverse.com/job/developer-run-tests/815/
#14 Updated by Tom Clegg over 2 years ago
13198-keep-web-metrics @ 413db07b4c81ea08663f90f31ee03227349d2be4 https://ci.curoverse.com/view/All/job/developer-run-tests/832/
This doesn't have "time to fetch block". It just exports the cache metrics we were already collecting (and exporting in status.json) and exports them as prometheus counters/gauges.