Skip to content

docs: clarify send/recv msg size, normalize prefix matching#76

Merged
ankurs merged 1 commit intomainfrom
feat/config-msg-size-comments-v2
Apr 9, 2026
Merged

docs: clarify send/recv msg size, normalize prefix matching#76
ankurs merged 1 commit intomainfrom
feat/config-msg-size-comments-v2

Conversation

@ankurs
Copy link
Copy Markdown
Member

@ankurs ankurs commented Apr 9, 2026

Summary

  • Clarify that GRPCMaxSendMsgSize limits response size from the service and GRPCMaxRecvMsgSize limits request size to the service
  • Separate per-field comments (previously a shared comment block)
  • Normalize HTTP header prefixes once at init in getCustomHeaderMatcher instead of per-request strings.ToLower
  • Regenerate READMEs via make doc

Test plan

  • make test passes
  • make lint clean
  • make doc run, READMEs updated

Summary by CodeRabbit

Release Notes

  • New Features

    • Added configuration options for enhanced debug logging control.
  • Documentation

    • Updated API reference documentation and improved descriptions of gRPC message size configuration options.
  • Performance

    • Optimized header matching logic to reduce runtime overhead.

- Clarify GRPCMaxSendMsgSize = response size, GRPCMaxRecvMsgSize = request size
- Normalize HTTP header prefixes once at init instead of per-request
- Regenerate READMEs via make doc
Copilot AI review requested due to automatic review settings April 9, 2026 09:18
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 updates project documentation and slightly optimizes HTTP header prefix matching in the grpc-gateway header matcher to avoid per-request normalization work.

Changes:

  • Clarifies GRPCMaxSendMsgSize vs GRPCMaxRecvMsgSize semantics (response vs request sizing) and splits the previously shared comment.
  • Normalizes configured HTTP header prefixes once during matcher creation (instead of lowercasing prefixes per request).
  • Regenerates generated READMEs (make doc), updating links/line references.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
README.md Updates generated doc links/line references to reflect current code layout.
core.go Pre-lowercases header prefixes inside getCustomHeaderMatcher for consistent matching and less per-request work.
config/README.md Updates generated config docs to reflect clarified gRPC send/recv sizing comments (and regenerated output).
config/config.go Clarifies GRPCMaxSendMsgSize (responses) vs GRPCMaxRecvMsgSize (requests) field comments and default meaning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bc76f389-73c1-41b8-8c4b-d72b2249d2d6

📥 Commits

Reviewing files that changed from the base of the PR and between de96de5 and 74c4243.

📒 Files selected for processing (4)
  • README.md
  • config/README.md
  • config/config.go
  • core.go

📝 Walkthrough

Walkthrough

The PR updates API reference documentation, introduces two new configuration fields for debug logging control, clarifies gRPC message size field documentation, and optimizes header prefix matching by precomputing lowercase values instead of lowercasing during each iteration.

Changes

Cohort / File(s) Summary
API Reference Documentation
README.md
Updated API reference link anchors to point to new line ranges for SetOTELGRPCClientOptions, SetOTELGRPCServerOptions, SetOTELOptions, and New functions in core.go.
Configuration Fields & Documentation
config/config.go, config/README.md
Added two new exported Config fields: DisableDebugLogInterceptor and DebugLogHeaderName. Updated comments for GRPCMaxSendMsgSize and GRPCMaxRecvMsgSize to clarify they represent response and request size limits respectively. Updated Validate() method documentation link target.
Header Matching Optimization
core.go
Optimized getCustomHeaderMatcher function to precompute lowercased prefixes into a separate slice, eliminating repeated strings.ToLower() calls and len(prefix) > 0 guards during header matching iterations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Suggested reviewers

  • vestor
  • fajran

Poem

🐰 The docs now shine with clearer light,
New config fields make settings right,
And headers match with faster grace,
Precomputed prefixes set the pace! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures both main changes: clarifying send/recv message size documentation and optimizing prefix matching normalization in the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/config-msg-size-comments-v2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ankurs ankurs merged commit 1b6160f into main Apr 9, 2026
11 checks passed
@ankurs ankurs deleted the feat/config-msg-size-comments-v2 branch April 9, 2026 09:33
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