Skip to content

Commit

Permalink
Merge pull request #142 from Sh1ftry/empty-members-assignment
Browse files Browse the repository at this point in the history
Increase membersWithEmptyAssignment when MemberAssignment is empty
  • Loading branch information
weeco authored Apr 25, 2022
2 parents 2a62a9d + a4cbed2 commit 4fbec9a
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 4fbec9a

Please sign in to comment.