Skip to content
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

Closed
Tracked by #28644 ...
evan-bradley opened this issue May 24, 2023 · 4 comments · Fixed by #29710
Closed
Tracked by #28644 ...

[pkg/ottl] Add an error mode to ignore errors and silence warnings #22743

evan-bradley opened this issue May 24, 2023 · 4 comments · Fixed by #29710
Labels
Contribfest enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed pkg/ottl priority:p2 Medium

Comments

@evan-bradley
Copy link
Contributor

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, since ignore also implies that error messages may not be printed. I would propose renaming ignore to warn and adding a new silent 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

@TylerHelmuth
Copy link
Member

I like the rename. Should probably do this sooner rather than later since it is a breaking change.

@github-actions
Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jul 24, 2023
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
@TylerHelmuth TylerHelmuth reopened this Sep 22, 2023
@evan-bradley evan-bradley added never stale Issues marked with this label will be never staled and automatically removed and removed closed as inactive labels Sep 22, 2023
@TylerHelmuth
Copy link
Member

TylerHelmuth commented Oct 11, 2023

I think we waited too long on this name change, but I am still open to adding a silent option

@TylerHelmuth TylerHelmuth added good first issue Good for newcomers help wanted Extra attention is needed Contribfest labels Oct 11, 2023
@TylerHelmuth TylerHelmuth removed help wanted Extra attention is needed good first issue Good for newcomers labels Oct 21, 2023
TylerHelmuth added a commit that referenced this issue Dec 8, 2023
**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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribfest enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed pkg/ottl priority:p2 Medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants