-
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/ottl] Add an error mode to ignore errors and silence warnings #22743
Comments
I like the rename. Should probably do this sooner rather than later since it is a breaking change. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
I think we waited too long on this name change, but I am still open to adding a |
**Description:** Adds a new ErrorMode, `silent`, that `StatementSequence` and `ConditionSequence` can use to disable logging when ignoring errors. **Link to tracking Issue:** Closes #22743 **Testing:** Updated unit tests **Documentation:** Updated READMEs and godoc comments.
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Some Collector users have requested that we add an option to silence the warning messages printed when errors occur in a set of statements running with error mode set to
ignore
.Describe the solution you'd like
Add a new error mode that continues processing statements, but doesn't print error messages.
We should probably rename the
ignore
error mode if we add a new option, sinceignore
also implies that error messages may not be printed. I would propose renamingignore
towarn
and adding a newsilent
error mode that accomplishes this functionality.We should also provide guidance on when to use this feature, since if possible users should try to address error conditions in their statements.
Describe alternatives you've considered
See if we can provide tools to address the conditions that cause the errors themselves (e.g. providing more checks for avoiding mismatched types). Allowing users to silence error messages should be considered an advanced feature since it provides the possibility of making errors invisible to users.
Additional context
No response
The text was updated successfully, but these errors were encountered: