quiche icon indicating copy to clipboard operation
quiche copied to clipboard

lib: add support for qlogging packet lost events

Open LPardue opened this issue 6 months ago • 1 comments

To date, we've focused on reporting packet loss counts as aggregate metrics.

This change adds support for the qlog packet_lost event. We already log packet_sent events and include the frames in that event, so we can reduce overheads by omitting them from the packet_lost events.

The tricky part of this change is wiring up logging so that it can access the data it needs. Rather than modify the recovery module to change it from passing a count to a list of packets, I opted instead to conditionally store lost packets based on the qlog feature, and then provide an accessor for reading them at key points in the connection lifecycle (in the receive loop, or after a timeout). By storing the loss Instant, we ensure the event is logged with a timestamp reflective of the actual time quiche determined the loss.

LPardue avatar Jun 04 '25 06:06 LPardue

@antoniovicente this PR will end up conflicting with https://github.com/cloudflare/quiche/pull/2070 but I wanted to keep the proposal as simple as possible to highlight the issues with storing/passing lost packet details. It should be easy enough to land this after your changes once we agree the important parts.

LPardue avatar Jun 04 '25 06:06 LPardue