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 a function for concatenating lists #32266

Closed
lopes-felipe opened this issue Apr 9, 2024 · 2 comments
Closed

[pkg/ottl] Add a function for concatenating lists #32266

lopes-felipe opened this issue Apr 9, 2024 · 2 comments
Labels
enhancement New feature or request needs triage New item requiring triage pkg/ottl

Comments

@lopes-felipe
Copy link
Contributor

Component(s)

pkg/ottl

Is your feature request related to a problem? Please describe.

OTTL has no way to concatenate two (or more) lists into a single one, requiring to do some not-so-great workarounds with concat() and split(), and others.

Describe the solution you'd like

Add a new OTTL function that receives two lists and returns a new one containing all the items from both.

Describe alternatives you've considered

split(concat([concat(a, ","), concat(b, ",")], ","), ",")

Additional context

Use case: dynamically define the list of labels to be provided for the keep_keys from two sources.

@lopes-felipe lopes-felipe added enhancement New feature or request needs triage New item requiring triage labels Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Pinging code owners:

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

@TylerHelmuth
Copy link
Member

This a duplicate of #32141. I am closing this issue in favor of the other. @lopes-felipe please ping me if you feel the feature you're requesting is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage pkg/ottl
Projects
None yet
Development

No branches or pull requests

2 participants