Skip to content

feat(gateways): report Kafka group members' client id and host - #4651

Merged
krishvishal merged 1 commit into
masterfrom
kafka-member-client-id
Oct 28, 2026
Merged

krishvishal merged 1 commit into
masterfrom
kafka-member-client-id

Conversation

@krishvishal

Copy link
Copy Markdown
Member

Which issue does this PR address?

Closes #4511

Rationale

kafka-consumer-groups.sh --describe --members showed an empty CLIENT-ID and HOST for every member of a gateway group. Operators use these two columns to find the process behind a consumer. Kafka fills both from the JoinGroup request: the client id from the request header, and the host from the address of the connection. The gateway handlers saw neither.

What changed?

Each connection now keeps the first client id that a request header names, cut to 1,024 bytes. It also keeps the peer IP address in Kafka's /10.0.0.7 form. A member takes both from the connection that it last joined through, and DescribeGroups reports them. A new member id now starts with the client id, as in Kafka, where it used to start with member.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Oct 26, 2026
@krishvishal

Copy link
Copy Markdown
Member Author

/skill team-review

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.15%. Comparing base (6400415) to head (8273e4e).

❗ There is a different number of reports uploaded between BASE (6400415) and HEAD (8273e4e). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (6400415) HEAD (8273e4e)
rust 4 3
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4651      +/-   ##
============================================
- Coverage     90.82%   81.15%   -9.67%     
  Complexity     3104     3104              
============================================
  Files          1479     1479              
  Lines        361309   361306       -3     
  Branches     305179   305176       -3     
============================================
- Hits         328157   293228   -34929     
- Misses        26257    61121   +34864     
- Partials       6895     6957      +62     
Components Coverage Δ
Rust Core 80.52% <ø> (-11.64%) ⬇️
Java SDK 78.14% <ø> (ø)
C# SDK 83.60% <ø> (ø)
Python SDK 85.67% <ø> (ø)
PHP SDK 90.71% <ø> (ø)
Node SDK 96.44% <ø> (ø)
Go SDK 69.30% <ø> (ø)
C++ SDK 85.55% <ø> (ø)
see 482 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary: The DescribeGroups client id and host wiring is correct on the wire path, and the frame pricing, docs and TCP test agree. The one gap is API-level: GroupCoordinator::join() accepts a client_id that only the connection layer caps, though no wire path reaches it.

Counts: critical 0, warning 1, nit 1, simplification 1


This review was generated by Claude Code 2.1.310 on deepseek-flash[1m]. Review the output before you act on it.

Comment thread gateways/kafka/src/group/state.rs Resolved
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Oct 26, 2026
numinnex
numinnex previously approved these changes Oct 28, 2026
mmodzelewski
mmodzelewski previously approved these changes Oct 28, 2026
DescribeGroups left CLIENT-ID and HOST empty. A member now keeps the client id and peer address of the connection it last joined through, and its id starts with the client id.
@krishvishal
krishvishal dismissed stale reviews from mmodzelewski and numinnex via 8273e4e October 28, 2026 18:12
@krishvishal
krishvishal force-pushed the kafka-member-client-id branch from 3fbd4cd to 8273e4e Compare October 28, 2026 18:12
@krishvishal
krishvishal merged commit c0f0503 into master Oct 28, 2026
77 checks passed
@krishvishal
krishvishal deleted the kafka-member-client-id branch October 28, 2026 18:57
@github-actions github-actions Bot removed the S-waiting-on-author PR is waiting on author response label Oct 28, 2026
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.

Kafka gateway: list offsets-only groups as Empty, and serve DeleteGroups and OffsetDelete

5 participants