quinn icon indicating copy to clipboard operation
quinn copied to clipboard

Generate qlog traces

Open Ralith opened this issue 5 years ago • 8 comments

qlog is a draft standard for encoding protocol event traces. It might be useful for Quinn to have conditionally compiled support for generating qlog traces to debug complex behavior using qlog-oriented tooling.

Ralith avatar Jul 22 '19 02:07 Ralith

Adding an interop tag here because qlog generation is part of the interop listed test under L.

There is an existing qlog implementation that we could integrate.

stammw avatar Apr 09 '20 10:04 stammw

That would make sense, I think!

djc avatar Apr 09 '20 11:04 djc

Awesome find! That'll make this a lot easier.

Ralith avatar Apr 09 '20 16:04 Ralith

Any news on this?

euberdeveloper avatar Dec 20 '21 00:12 euberdeveloper

Nobody's taken it on yet.

Ralith avatar Dec 20 '21 00:12 Ralith

I'll implement this eventually. qlog was instrumental for debugging and diagnosing congestion control in my (closed source) QUIC implementation.

qlog traces are MASSIVE even with gzip, which also uses a lot of CPU. You would need the ability to enable qlog on a per-connection basis, and it has to be done early so you don't drop those initial events.

I was thinking:

/// Enable logging for events that could not be associated with a connection (ex. unknown packets)
Endpoint::enable_qlog(w: AsyncWrite)

/// Enable logging for all events associated with this connection
Connecting::enable_qlog(w: AsyncWrite)

Most of the events will be emitted inside a Mutex and a a blocking filesystem write would be devastating. AsyncWrite is used mostly so the compiler would catch those.

A filter would also be cool, as most qlog events/fields are optional and some are very verbose. For example, you can emit base64 encoded packet/steam contents with the raw field, but that's extremely situational. It's not as simple as a verbosity level because the most verbose events are often unrelated.

kixelated avatar Sep 21 '23 17:09 kixelated

Note qvis reportedly does not plan to implement qlog 0.4; they're sticking with 0.3 until a 1.0 RC is specced.

You would need the ability to enable qlog on a per-connection basis

I'm not sure about this. I'd imagine usually you're either spinning up an endpoint purely for testing, or don't want qlog at all.

Ralith avatar Sep 26 '23 04:09 Ralith

support. very useful for interop and special uses. would love to get

marcblanchet avatar Oct 22 '23 20:10 marcblanchet