-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pkg/stanza] Add mute
option for operators' error Handler
#32145
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
A I typically don't like enumerating combinations but given the above, maybe it would be most intuitive to just add new options to |
I think that would serve the purpose without making the configuration confusing. |
Removing |
…ng (#32220) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> When stanza operators fail to process a message, no matter if they send the message or drop it an error message is logged. This can be quite "noisy" when users want to set up a best effort operator which on error should only send/drop the message without logging an error. With introducing the `send_quiet` and `drop_quiet` options we provide the option to set the level of the logged error. `send_quiet` and `drop_quiet` log the error on debug level. **Link to tracking Issue:** #32145 **Testing:** <Describe what testing was performed and which tests were added.> Added [unit-tests](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32220/files#diff-6a03331b322fcfd255ead096ac5c7c9dd9267a2d6697ea629548f37f4049896aR70) **Documentation:** <Describe the documentation added.> [Enhanced the operator's docs](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32220/files#diff-8f730eb2d61d9ca8c5cf863e9e7f3ddfe51984c46c6259dd7258902d6cc10090L2) --------- Signed-off-by: ChrsMark <chrismarkou92@gmail.com> Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Closed by #32220 |
…ng (open-telemetry#32220) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> When stanza operators fail to process a message, no matter if they send the message or drop it an error message is logged. This can be quite "noisy" when users want to set up a best effort operator which on error should only send/drop the message without logging an error. With introducing the `send_quiet` and `drop_quiet` options we provide the option to set the level of the logged error. `send_quiet` and `drop_quiet` log the error on debug level. **Link to tracking Issue:** open-telemetry#32145 **Testing:** <Describe what testing was performed and which tests were added.> Added [unit-tests](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32220/files#diff-6a03331b322fcfd255ead096ac5c7c9dd9267a2d6697ea629548f37f4049896aR70) **Documentation:** <Describe the documentation added.> [Enhanced the operator's docs](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32220/files#diff-8f730eb2d61d9ca8c5cf863e9e7f3ddfe51984c46c6259dd7258902d6cc10090L2) --------- Signed-off-by: ChrsMark <chrismarkou92@gmail.com> Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Component(s)
pkg/stanza
Describe the issue you're reporting
At the moment if an
operator
fails to parse an entry an error is logged byopentelemetry-collector-contrib/pkg/stanza/operator/helper/transformer.go
Line 97 in 2170757
For example given the following configuration:
where we want to apply the
move
on a best effort approach only if theif_key
exists in theattributes
, we will get the following error in the collector's logs:However, there might be cases where users want to use an operator in a best effort way, and hence having an actual error log for each failure is sth that can bug the users and flood their logs as well.
There are 2 options that I can think here:
OnError
setting isSendOnError
, otherwise if weDropOnError
we can log on error level.muteErrorLogs
setting which will be decoupled by theOnError
setting in order to have a specific way how to handle the verbosity of the operator's errors.The text was updated successfully, but these errors were encountered: