-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[pkg/ottl] Standardize grammar slices from raw to pcommon.Slice #47230
Description
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
The OTTL grammar currently handles slices inconsistently, producing either Go's raw slices ([]any) or pcommon.Slice depending on usage and whether the value comes from a literal or a function. To avoid unnecessary conversions from raw slices to pdata, and to ensure consistency, we should standardize all slices to pcommon.Slice, similar to the approach taken for maps.
Note: This is a breaking change for the OTTL API.
Important
This is not a trivial issue. Please don’t just vibe-code it. Make sure you understand how the OTTL core works and what changes are required to implement this properly.
Describe the solution you'd like
Slices produced by the OTTL grammar are pcommon.Slice, and it's fully handled by ALL existing getters, contexts, etc.
Describe alternatives you've considered
No response
Additional context
- More context on the maps standardization can be found at: [pkg/ottl] adapt
mapGetterto handle nested map items within slices #37408
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.