qlogwriter: implement the draft-12 trace header#5360
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements the draft-12 trace header format for qlog files, updating the qlogwriter package to use a simplified traceHeader structure instead of the previous nested topLevel and trace structures.
- Replaces complex nested trace structures with a streamlined
traceHeaderimplementation - Updates the reference time format to use RFC3339Nano string format with clock metadata instead of numeric milliseconds
- Refactors tests to use a shared helper function and validate the new header format
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| qlogwriter/writer.go | Simplifies trace initialization by directly creating traceHeader instead of nested structures |
| qlogwriter/trace.go | Implements new traceHeader struct replacing topLevel, trace, vantagePoint, and commonFields |
| qlogwriter/trace_test.go | Consolidates test functions and updates assertions to validate new header format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| VantagePoint vantagePoint | ||
| CommonFields commonFields | ||
| } | ||
| // The following fields are not required by the qlog draft anymore, |
There was a problem hiding this comment.
The comment mentions 'qlog draft' but should specify 'draft-12' for clarity since there are multiple qlog drafts.
| // The following fields are not required by the qlog draft anymore, | |
| // The following fields are not required by qlog draft-12 anymore, |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5360 +/- ##
==========================================
+ Coverage 83.02% 83.04% +0.01%
==========================================
Files 156 156
Lines 18743 18723 -20
==========================================
- Hits 15561 15547 -14
Misses 2563 2563
+ Partials 619 613 -6 ☔ View full report in Codecov by Sentry. |
Requires quiclog/qvis#90, otherwise our qlogs won't be accepted by qvis without a warning.