Skip to content

Commit

Permalink
Merge pull request #429 from sciclon2/bugfix/consumer-assignments-issue
Browse files Browse the repository at this point in the history
fix: Fixing Issue with Member Assignments in Consumer Group
  • Loading branch information
danielqsj authored Aug 20, 2024
2 parents 8eee667 + 84b3176 commit 3b37dc8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kafka_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ func (e *Exporter) collect(ch chan<- prometheus.Metric) {
}
} else {
for _, member := range group.Members {
if len(member.MemberAssignment) == 0 {
klog.Warningf("MemberAssignment is empty for group member: %v in group: %v", member.MemberId, group.GroupId)
continue
}
assignment, err := member.GetMemberAssignment()
if err != nil {
klog.Errorf("Cannot get GetMemberAssignment of group member %v : %v", member, err)
Expand Down

0 comments on commit 3b37dc8

Please sign in to comment.