append

Learn about the append OTTL editor function.

This function is used to append values to a specified target. However, the resulting field is always of type pcommon.Slice. The transformation of scalar values into arrays or appending different types into a common slice could lead to inconsistencies and potential issues in processing or data integrity.

Instead of append, consider using more controlled functions like set that allow you to add or modify values without changing the underlying structure of the existing data fields. These functions typically allow you to maintain key-value pairs, which might be more predictable and less prone to causing unintentional schema changes.