Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Adds PSliceGetSetter interface and StandardPSliceGetSetter to improve type-safety in OTTL functions.
ottl.GetSetter[K] is actually used to handle different slice types in OTTL functions input attributes, but it does not handle all possible slice types we can get on this editor. With this new data type we wouldn't need to handle all those variances in the function's code, avoiding repetitive switches/transformations.
Describe the solution you'd like
Follow similar implementation to ottl.PMapGetSetter (#39657).
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.