redpanda-data / redpanda-data/benthos
Do not execute log processors below configured log level
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
Currently, log processors always execute, even if their log level is lower than the currently set log level.
Consider the configuration below. If the current log level is not TRACE, I would not expect the mapping to execute.
input:
generate:
mapping: |
root = {}
pipeline:
processors:
- log:
level: TRACE
fields_mapping: |
root = throw("foo")
output:
stdout: {}
This would be a minor performance improvement, and matches how log formatting works in other languages (e.g. Python).
The log processor states that the message remains unchanged, so skipping its execution would have no effect on the pipeline.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides only a YAML reproduction; locate the log processor and configured log-level handling first. Verify that the fields mapping is not evaluated when its level is below the active threshold while the pipeline remains unchanged, then run the relevant processor tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100