Skip to content

[pkg/ottl] Standardize grammar slices from raw to pcommon.Slice #47230

@edmocosta

Description

@edmocosta

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

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.

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