http3: qlog the frame length and payload length of parsed frames#5380
http3: qlog the frame length and payload length of parsed frames#5380marten-seemann merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances HTTP3 frame logging by adding frame length information to qlog events. The main purpose is to record both the complete frame length (including header) and payload length for parsed frames to improve debugging capabilities.
- Added frame header length tracking for all HTTP3 frame types
- Updated qlog events to include both total frame length and payload length
- Refactored frame parsing to use a shared counting byte reader
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| http3/frames.go | Introduces countingByteReader for tracking bytes read and updates frame parsing to record frame lengths |
| http3/qlog.go | Updates qlogParsedHeadersFrame to accept headersFrame struct and record both frame and payload lengths |
| http3/stream.go | Changes parseTrailer function signature to accept *headersFrame instead of uint64 |
| http3/conn.go | Updates decodeTrailers to work with headersFrame struct instead of length parameter |
| http3/capsule.go | Removes duplicate countingByteReader definition and uses the one from frames.go |
| http3/http3_helper_test.go | Adds expectedFrameLength helper function for testing frame length calculations |
| http3/*_test.go | Updates test files to use new function signatures and validate frame length logging |
Comments suppressed due to low confidence (1)
http3/frames.go:1
- The panic statement is unreachable because the switch statement above handles all cases and includes a default case that calls t.Fatalf(). This line should be removed.
package http3
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5380 +/- ##
==========================================
- Coverage 83.06% 83.06% -0.00%
==========================================
Files 158 158
Lines 19114 19137 +23
==========================================
+ Hits 15876 15895 +19
- Misses 2613 2616 +3
- Partials 625 626 +1 ☔ View full report in Codecov by Sentry. |
e20397d to
4c35ff0
Compare
Part of #4124.