Add systematic tracing for control message encode/decode#1144
Add systematic tracing for control message encode/decode#1144
Conversation
Centralize protocol message logging in the Message trait blanket impls instead of scattering trace! calls throughout the codebase. On encode, log the message at TRACE level. On decode, use a conditional path: when TRACE is enabled, capture raw bytes via copy_to_bytes for diagnostics; when disabled, use the zero-copy buf.take() path. Decode failures always warn, with raw bytes included only at TRACE level. Also add trace logging for IETF GroupHeader (which implements Encode/Decode directly rather than via Message), and remove 22 scattered trace! lines that logged noisy operational details (frame sizes, group lifecycle) rather than actual messages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (7)
WalkthroughThis pull request consolidates tracing statements across the MOQ lite implementation. It removes multiple 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Messagetrait blanket impls for both lite and IETF, replacing 22 scatteredtrace!callscopy_to_bytesfor diagnostics (logged on failure aswarn!); when disabled, use the zero-copybuf.take()path with no overheadGroupHeaderwhich implementsEncode/DecodedirectlyTest plan
just checkpasses — all tests and lintingRUST_LOG=moq_lite=traceand verify trace output shows encoded/decoded messageswarn!output on malformed input includes raw bytes at TRACE level🤖 Generated with Claude Code