Skip to content

Conversation

@alexcams
Copy link
Contributor

Description

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.

Link to tracking issue

Fixes #44421

Testing

Included unit and functional tests.

@alexcams alexcams marked this pull request as draft November 26, 2025 14:15
@alexcams alexcams marked this pull request as ready for review November 27, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pkg/ottl] Add PSliceGetSetter and StandardPSliceGetSetter

3 participants