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 merge_all_maps #32954

Open
strawgate opened this issue May 8, 2024 · 11 comments
Open

[pkg/ottl] Add merge_all_maps #32954

strawgate opened this issue May 8, 2024 · 11 comments
Labels
enhancement New feature or request pkg/ottl Stale

Comments

@strawgate
Copy link
Contributor

strawgate commented May 8, 2024

Component(s)

No response

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

Right now merge_maps requires a source map and a target map.

There does not seem to be a good way to merge an array of maps.

Describe the solution you'd like

merge_all_maps(source, target, method)

where source is an array of maps and target is a map

Method (or whatever it's called on merge_map) would decide whether it's an insert, upset, etc

Describe alternatives you've considered

No response

Additional context

No response

@strawgate strawgate added enhancement New feature or request needs triage New item requiring triage labels May 8, 2024
Copy link
Contributor

github-actions bot commented May 8, 2024

Pinging code owners:

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

@evan-bradley
Copy link
Contributor

@TylerHelmuth How would you feel about changing the source parameter in merge_maps to a list instead of a single value? This would be a huge breaking change, but would let us avoid having two editors. Maybe we could find a way to have a transition period.

@TylerHelmuth
Copy link
Member

We could add a third, optional parameter like additionalMaps that is a list.

Technically the solution to this issue right now is to have multiple merge_maps statements in a row.

@strawgate
Copy link
Contributor Author

I think the issue is that with things like Windows event data there are an arbitrary number of maps present in the array

@TylerHelmuth
Copy link
Member

@strawgate interesting, can you go into more details about that use case?

@strawgate
Copy link
Contributor Author

I detailed it here: #32952

Happy to include more info if you have specific questions

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.

Copy link
Contributor

github-actions bot commented Sep 9, 2024

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 Sep 9, 2024
@strawgate
Copy link
Contributor Author

This use case still exists

@github-actions github-actions bot removed the Stale label Sep 11, 2024
@strawgate
Copy link
Contributor Author

I would be willing to make an attempt at contributing this if it seems reasonable?

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 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg/ottl Stale
Projects
None yet
Development

No branches or pull requests

3 participants