Follow-up from "Introduce instrumentation for all Elasticsearch HTTP requests"
The following discussion from !32822 (merged) should be addressed:
-
@ashmckenzie started a discussion: (+1 comment) thought (non-blocking): If we broke out each service into private methods we could make
#add_instrumentation_data
a little easier to read and be more SRP focused now that it's on the larger side, e.g.def add_instrumentation_data(payload) instrument_gitaly(payload) ... end private def instrument_gitaly(payload) gitaly_calls = Gitlab::GitalyClient.get_request_count return if gitaly_calls.zero? payload[:gitaly_calls] = gitaly_calls payload[:gitaly_duration_s] = Gitlab::GitalyClient.query_time end
Let's leave this as is though
🙂
Edited by Ash McKenzie