Skip to content

Commit

Permalink
Report PSRL error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanGuedes committed Sep 19, 2024
1 parent 5371da6 commit a92b93e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ingester/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ func (s *stream) validateEntries(ctx context.Context, entries []logproto.Entry,
failedEntriesWithError = make([]entryWithError, 0, len(toStore))
for i := 0; i < len(toStore); i++ {
failedEntriesWithError = append(failedEntriesWithError, entryWithError{&toStore[i], &validation.ErrStreamRateLimit{RateLimit: flagext.ByteSize(limit), Labels: s.labelsString, Bytes: flagext.ByteSize(len(toStore[i].Line))}})
if i == 0 {
// only report PSRL write failure once.
s.writeFailures.Log(s.tenant, failedEntriesWithError[len(failedEntriesWithError)-1].e)
}
rateLimitedBytes += len(toStore[i].Line)
}
}
Expand Down

0 comments on commit a92b93e

Please sign in to comment.