-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Description
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
I'd like there be the ability to also remove elements from slices/arrays, as the inverse of append
Describe the solution you'd like
transform/test_list_removal:
error_mode: ignore
log_statements:
- conditions:
- ContainsValue(log.attributes["tags"], "unparsed")
statements:
- append(log.attributes["tags"], "parsed")
- delete(log.attributes["tags"], "unparsed")Perhaps this is not the most ideal solution to the problem, but I am currently investigating a replacement for a mass log-processing solution and this is a feature we have heavily relied in our rulesets, to handle bits of processing.
Describe alternatives you've considered
I've not been able to infer a solution from the currently available OTTL functions. Perhaps something involving flatten and delete_key, but coming back from flatten is not the clearest either.
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Reactions are currently unavailable