feat(loki.source.file): Add option to set max_line_size#6026
feat(loki.source.file): Add option to set max_line_size#6026
max_line_size#6026Conversation
| onPositionsFileError: c.args.OnPositionsFileError, | ||
| legacyPositionUsed: c.args.LegacyPositionsFile != "", | ||
| }) | ||
| tailer := newTailer( |
There was a problem hiding this comment.
Just removed the helper newSource since it's not needed any more
| watcherConfig tail.WatcherConfig | ||
|
|
||
| running *atomic.Bool | ||
| opts tailerOptions |
There was a problem hiding this comment.
Simplified this alot. Instead of storing every property from options we just store options
|
💻 Deploy preview available (fix(loki.source.file): Add option to set |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2f62c6492
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbb91610c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
max_line_sizemax_line_size
|
@codex review |
|
💻 Deploy preview available (feat(loki.source.file): Add option to set |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39573b31db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
newline and it's part of the line.
| func (a *Arguments) SetToDefault() { | ||
| a.FileWatch.SetToDefault() | ||
| a.FileMatch.SetToDefault() | ||
| a.MaxLineSize = 1 * units.MiB |
There was a problem hiding this comment.
Before this was unlimited and by default loki will reject entries over 256KB.
But we should find a reasonable default here.
clayton-cornell
left a comment
There was a problem hiding this comment.
Minor suggestion. Everything else is OK for doc input.
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Brief description of Pull Request
Add config
max_line_sizeto protect against reading to large lines. Currently it is possible to OOM alloy if you read a really big file without any newlines.Pull Request Details
Issue(s) fixed by this Pull Request
Part of: #6014
Notes to the Reviewer
This pr includes some small cleanups.
PR Checklist