-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 send_quiet
/drop_quiet
options for on_error setting
#32220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, only the docs part need minor adjustments.
pkg/stanza/docs/types/on_error.md
Outdated
@@ -1,10 +1,21 @@ | |||
# `on_error` parameter | |||
The `on_error` parameter determines the error handling strategy an operator should use when it fails to process an entry. There are 2 supported values: `drop` and `send`. | |||
The `on_error` parameter determines the error handling strategy an operator should use when it fails to | |||
process an entry. There are 2 supported values: `drop` and `send`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process an entry. There are 2 supported values: `drop` and `send`. | |
process an entry. There are 4 supported values: `drop`, `send`, `send_quiet`, and `drop_quiet`. |
pkg/stanza/docs/types/on_error.md
Outdated
operators are defined which might flood the logs with errors. | ||
|
||
### `drop_quiet` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
How about the following order?
drop
drop_quiet
send
send_quiet
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 will log the error on debug level. Signed-off-by: ChrsMark <[email protected]>
5bdbd54
to
be06c10
Compare
…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 <[email protected]> Co-authored-by: Daniel Jaglowski <[email protected]>
Description:
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
anddrop_quiet
options we provide the option to set the level of the logged error.send_quiet
anddrop_quiet
log the error on debug level.Link to tracking Issue: #32145
Testing: Added unit-tests
Documentation: Enhanced the operator's docs