Skip to content

http3: qlog the frame length and payload length of parsed frames#5380

Merged
marten-seemann merged 1 commit intomasterfrom
qlog-http3-frame-len
Oct 12, 2025
Merged

http3: qlog the frame length and payload length of parsed frames#5380
marten-seemann merged 1 commit intomasterfrom
qlog-http3-frame-len

Conversation

@marten-seemann
Copy link
Copy Markdown
Member

Part of #4124.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

codecov Bot commented Oct 12, 2025

Codecov Report

❌ Patch coverage is 81.81818% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.06%. Comparing base (ce12204) to head (4c35ff0).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
http3/conn.go 0.00% 8 Missing and 1 partial ⚠️
http3/stream.go 0.00% 2 Missing ⚠️
http3/frames.go 97.87% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@marten-seemann marten-seemann merged commit b7d987f into master Oct 12, 2025
43 of 44 checks passed
@marten-seemann marten-seemann deleted the qlog-http3-frame-len branch October 13, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants