From a92b93eb9cd72cd51efa4e91a60ffc886e40bd8a Mon Sep 17 00:00:00 2001 From: DylanGuedes Date: Thu, 19 Sep 2024 11:18:05 -0300 Subject: [PATCH] Report PSRL error message. --- pkg/ingester/stream.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/ingester/stream.go b/pkg/ingester/stream.go index 0754de9caf0fa..b1f3ab379cc98 100644 --- a/pkg/ingester/stream.go +++ b/pkg/ingester/stream.go @@ -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) } }