Skip to content

[pkg/ottl] Accept dynamic lists in keep_keys #40440

Open
@francois07

Description

@francois07

Component(s)

pkg/ottl

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

When using keep_keys, It would be very convenient to be able to pass it a dynamic list of keys to keep. For example to filter datapoint labels dynamically based on a resource attribute.

Describe the solution you'd like

Make it possible for keep_keys to accept a dynamic list of keys, for example keep_key(datapoint.attributes, resource.attributes["labels"])

Describe alternatives you've considered

No response

Additional context

PSliceGetter from #40193 would be useful here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions