feat(metrics): track per-IP domain request metrics across HTTP and TCP passthrough traffic

This commit is contained in:
2026-04-13 18:33:28 +00:00
parent e988d935b6
commit 781634446a
8 changed files with 593 additions and 5 deletions
@@ -943,6 +943,9 @@ impl TcpListenerManager {
// Track connection in metrics — guard ensures connection_closed on all exit paths
metrics.connection_opened(route_id, Some(&ip_str));
if let Some(d) = effective_domain {
metrics.record_ip_domain_request(&ip_str, d);
}
let _conn_guard = ConnectionGuard::new(Arc::clone(&metrics), route_id, Some(&ip_str));
// Check if this is a socket-handler route that should be relayed to TypeScript