Skip to content

Commit

Permalink
fix: Report PSRL error message correctly (#14187)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:
Modify our `validateEntries` code to report a log failure when a PSRL is identified.
  • Loading branch information
DylanGuedes authored Sep 19, 2024
1 parent 3136880 commit a475153
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ingester/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ func (s *stream) validateEntries(ctx context.Context, entries []logproto.Entry,
failedEntriesWithError = append(failedEntriesWithError, entryWithError{&toStore[i], &validation.ErrStreamRateLimit{RateLimit: flagext.ByteSize(limit), Labels: s.labelsString, Bytes: flagext.ByteSize(len(toStore[i].Line))}})
rateLimitedBytes += len(toStore[i].Line)
}

// Log the only last error to the write failures manager.
s.writeFailures.Log(s.tenant, failedEntriesWithError[len(failedEntriesWithError)-1].e)
}

s.streamRateCalculator.Record(s.tenant, s.labelHash, s.labelHashNoShard, totalBytes)
Expand Down

0 comments on commit a475153

Please sign in to comment.