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

[processor/transform] Add support for functions to validate parameters #9563

Merged
merged 8 commits into from
May 5, 2022

Conversation

TylerHelmuth
Copy link
Member

Description:
This PR adds the ability for functions to return errors. Although no functions need to yet, this capability will allow function creators to validate input parameters before returning the ExprFunc.

Link to tracking Issue:
#9555

Testing:
Added new unit tests

@TylerHelmuth TylerHelmuth requested a review from a team April 27, 2022 21:36
@TylerHelmuth TylerHelmuth changed the title [processor/transform] Add support for functions to return errors [processor/transform] Add support for functions to validate parameters Apr 27, 2022
@TylerHelmuth
Copy link
Member Author

The truncate_all function has been merged in, which could take advantage of the error functionality added by this PR. I'd still like to add the parameter validation of that function (and the limit funciton I've also submitted a PR for) in a separate PR, leaving this PR only as adding the functionality, not implementing it.

@TylerHelmuth
Copy link
Member Author

@open-telemetry/collector-contrib-approvers please review.

@codeboten codeboten added the ready to merge Code review completed; ready to merge by maintainers label May 5, 2022
@codeboten codeboten merged commit 257d511 into open-telemetry:main May 5, 2022
@TylerHelmuth TylerHelmuth deleted the issue-9555 branch May 5, 2022 17:44
djaglowski pushed a commit to djaglowski/opentelemetry-collector-contrib that referenced this pull request May 10, 2022
open-telemetry#9563)

* Add support for functions to return errors

* update test name

* Updated changelog

* Updated changelog

Co-authored-by: Alex Boten <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants