L4 passthrough: failed tunnels are invisible to metrics, and error log conflates peek vs. tunnel failures #8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during the final whole-branch review of the L4 SNI Passthrough (Phase A) feature.
Problem 1: failed tunnels don't record metrics
handle_connection(src/l4.rs) bails via?on arun_tunnelerror, which skips the call torecord_l4_route_connection. This meanstotal_connections/total_bytes_sent/total_bytes_receivedonly count cleanly completed tunnels — a route whose backend is down (dial failure) produces no metric at all, rather than an incrementing failure counter. During an incident, the dashboard would show a route with zero recent connections even though clients are actively trying (and failing) to reach it.Problem 2: misleading error log label
main.rs's accept-loop error arm logs anyhandle_connectionerror as"L4 passthrough peek failed", even when the actual failure occurred later — in the backend dial or thecopy_bidirectionalrelay insiderun_tunnel, not in the ClientHello peek itself. This is confusing when debugging a real incident (a dead backend looks like a peek/parsing problem in the logs).Suggested fix
total_connectionswith a separate failure tally) even whenrun_tunnelerrors, so the dashboard reflects connection attempts, not just successes.Minor — operational/observability polish, not a correctness bug. Not blocking, logged for awareness.