Skip to content

Commit

Permalink
[kafkametricsreceiver] Fix issue with incorrect consumer offset
Browse files Browse the repository at this point in the history
  • Loading branch information
an-mmx committed Jul 3, 2024
1 parent 62ea24b commit b915542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/consumer_scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (s *consumerScraper) scrape(context.Context) (pmetric.Metrics, error) {
for partition, block := range partitions {
consumerOffset := block.Offset
offsetSum += consumerOffset
s.mb.RecordKafkaConsumerGroupOffsetDataPoint(now, offsetSum, group.GroupId, topic, int64(partition))
s.mb.RecordKafkaConsumerGroupOffsetDataPoint(now, consumerOffset, group.GroupId, topic, int64(partition))

// default -1 to indicate no lag measured.
var consumerLag int64 = -1
Expand Down

0 comments on commit b915542

Please sign in to comment.