mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 13:37:04 +00:00
Add a per-scheduling-group latency histogram that tracks the full transport-level CQL request lifetime: from fetching the request buffer until the response is written to the socket. Today latencies are accounted only on the storage proxy level, which leaves the time spent in the transport layer unaccounted. The time spent by a response waiting to be sent out can be significant. Having both the transport and the storage proxy latencies allows operators to tell where latency is accumulated. The histogram uses utils::time_estimated_histogram (range 0.5ms to 33s) and is exposed as scylla_transport_cql_request_latency_histogram with the scheduling_group_name label, following the cql_ prefix convention used by all other per-scheduling-group transport metrics. The start time is captured at the beginning of process_request(). The latency is recorded after the response is successfully written to the socket, ensuring the measurement covers processing time, response queue wait time, and actual I/O time. Co-authored-by: Marcin Maliszkiewicz <marcinmal@scylladb.com>