I thought the out_of_rack_requests metric would need to be reported at the routing stage.
Which is why I left it for a follow up PR, I thought it was going to require modifications to all of our route_to_* methods.
But it turns out its far simpler to just report it at the sending stage, which is what this PR does.
We just compare the rack of the node we are about to send against shotover's rack and record the metric if there is a mismatch.
I left a tracing::debug at the previous location of self.out_of_rack_requests.increment(1); to help disambiguate why we are getting out of rack requests.
closes https://github.com/shotover/shotover-proxy/issues/1526
I thought the
out_of_rack_requests
metric would need to be reported at the routing stage. Which is why I left it for a follow up PR, I thought it was going to require modifications to all of ourroute_to_*
methods. But it turns out its far simpler to just report it at the sending stage, which is what this PR does. We just compare the rack of the node we are about to send against shotover's rack and record the metric if there is a mismatch.I left a
tracing::debug
at the previous location ofself.out_of_rack_requests.increment(1);
to help disambiguate why we are getting out of rack requests.