limits: add tenant to log lines for per-stream rate-limited and out-of-order errors (#8177)

pull/8191/head
Ashwanth 2 years ago committed by GitHub
parent f24da4a194
commit 0723678573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/ingester/stream.go
  2. 2
      pkg/ingester/stream_test.go

@ -235,7 +235,7 @@ func errorForFailedEntries(s *stream, failedEntriesWithError []entryWithError, t
entryWithError.entry.Timestamp.String(), entryWithError.e.Error(), streamName)
}
fmt.Fprintf(&buf, "total ignored: %d out of %d", len(failedEntriesWithError), totalEntries)
fmt.Fprintf(&buf, "user '%s', total ignored: %d out of %d", s.tenant, len(failedEntriesWithError), totalEntries)
return httpgrpc.Errorf(statusCode, buf.String())
}

@ -84,7 +84,7 @@ func TestMaxReturnedStreamsErrors(t *testing.T) {
)
}
fmt.Fprintf(&expected, "total ignored: %d out of %d", numLogs, numLogs)
fmt.Fprintf(&expected, "user 'fake', total ignored: %d out of %d", numLogs, numLogs)
expectErr := httpgrpc.Errorf(http.StatusBadRequest, expected.String())
_, err = s.Push(context.Background(), newLines, recordPool.GetRecord(), 0, true, false)

Loading…
Cancel
Save