Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: offsetFetchResponse missing topic partitions #432

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

sciclon2
Copy link
Contributor

@sciclon2 sciclon2 commented Mar 16, 2024

Summary

Following the upgrade of the kafka_Exporter, a discrepancy in metrics was discovered, specifically involving consumer groups in an "Empty" state not being tracked. Upon examination, it was observed that the offsetFetchResponse did not contain necessary information for the consumer group identified as "pipes-pro-1dfe17f5-c4d9-4be2-bf46-144f03a60a36".

Worth to mention this CG is committing offsets and working properly, the client is manually handling it, that is the reason it shows up in Empty state

To investigate further, the exporter was initiated with additional logging parameters to capture details about the offsetFetchResponse. Running the exporter command showed that the initial response had a Version 1 with empty mapping: offsetFetchResponse: &{1 0 map[] .

Upon switching to Version 4, the mapping included the requisite information, allowing for successful tracking of consumer group activities: offsetFetchResponse: &{4 0 map[Private-Pipes-Synthetic-10-Events-Partition-Every-Second:map[0:0x40065f7b00 1:0x40065f73b0 2:0x40065f7e00 3:0x40065f7aa0 4:0x40065f7770 5:0x40065f7e60 6:0x40065f7dd0 7:0x40065f77a0 8:0x40065f7620 9:0x40065f7e90 10:0x40057f2000 11:0x40065f7da0 12:0x40065f7b60 13:0x40065f7560 14:0x40057f2030 15:0x40065f7590 16:0x40065f7b90 17:0x40065f7c50 18:0x40065f7cb0 19:0x40065f7bf0 20:0x40065f73e0 21:0x40065f75c0 22:0x40065f7ce0 23:0x40065f7bc0]].

Moreover, it was noted that the fetchOffsetVersion() function, previously utilized for this purpose, had been commented out, leading to the Version being hardcoded within the OffsetFetchRequest function.

@danielqsj
Copy link
Owner

LGTM, thanks @sciclon2

@danielqsj danielqsj merged commit 8eee667 into danielqsj:master Aug 20, 2024
1 check passed
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