Skip to content

Commit

Permalink
fix: More correctly report starting phase during kafka-reader startup (
Browse files Browse the repository at this point in the history
  • Loading branch information
benclive authored Oct 29, 2024
1 parent db0889e commit ea798e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kafka/partition/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (p *Reader) recordFetchesMetrics(fetches kgo.Fetches) {
fetches.EachRecord(func(record *kgo.Record) {
numRecords++
delay := now.Sub(record.Timestamp).Seconds()
if p.lastProcessedOffset == -1 {
if p.Service.State() == services.Starting {
p.metrics.receiveDelayWhenStarting.Observe(delay)
} else {
p.metrics.receiveDelayWhenRunning.Observe(delay)
Expand Down

0 comments on commit ea798e0

Please sign in to comment.