proxy: latency connect outcome (#5588)

## Problem

I recently updated the latency timers to include cache miss and pool
miss, as well as connection protocol. By moving the latency timer to
start before authentication, we count a lot more failures and it's
messed up the latency dashboard.

## Summary of changes

Add another label to LatencyTimer metrics for outcome. Explicitly report
on success
This commit is contained in:
Conrad Ludgate
2023-10-23 15:17:28 +01:00
committed by GitHub
parent b514da90cb
commit 94b4e76e13
2 changed files with 24 additions and 7 deletions

View File

@@ -194,9 +194,10 @@ impl GlobalConnPool {
info!("pool: cached connection '{conn_info}' is closed, opening a new one");
connect_to_compute(self.proxy_config, conn_info, session_id, latency_timer).await
} else {
latency_timer.pool_hit();
info!("pool: reusing connection '{conn_info}'");
client.session.send(session_id)?;
latency_timer.pool_hit();
latency_timer.success();
return Ok(Client {
inner: Some(client),
span: Span::current(),