Skip to content

Commit

Permalink
Increase membersWithEmptyAssignment when MemberAssignment is empty
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Padula <michal.padula@outlook.com>
  • Loading branch information
Sh1ftry committed Apr 4, 2022
1 parent 2a62a9d commit a4cbed2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prometheus/collect_consumer_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ func (e *Exporter) collectConsumerGroups(ctx context.Context, ch chan<- promethe
membersWithEmptyAssignment := 0
failedAssignmentsDecode := 0
for _, member := range group.Members {
if len(member.MemberAssignment) == 0 {
membersWithEmptyAssignment++
continue
}

kassignment, err := decodeMemberAssignments(group.ProtocolType, member)
if err != nil {
e.logger.Debug("failed to decode consumer group member assignment, internal kafka error",
Expand Down

0 comments on commit a4cbed2

Please sign in to comment.