Add Redis duration and call count Prometheus metrics
Spun out from #157 (closed).
We want to record Prometheus metrics for the number of Redis calls, and their duration, per application transaction (web request or background job).
The duration should be a histogram, and as @andrewn suggested in #157 (closed):
Do not use the default histogram buckets: perhaps
1, 2.5, 5, 10, 25, 50, +Inf
(in milliseconds, but represented in Prom in seconds) ?
As with #313 (closed), we want to record this per Redis instance. Unlike with that issue, we can do this with Prometheus labels, as the cardinality will be very low.
(Because Redis timings are typically very low, we don't want to use the default buckets.)