-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Component(s)
pkg/ottl
Describe the issue you're reporting
Background
The profiles signal uses indices + lookup table instead of an array or map.
For example, pprofile.Profile contains a lookup table of attributes (AttributeTable), which is referenced by an array of indices (AttributeIndices).
During the work on the transformprocessor ([draft PR(https://github.com//pull/39036)), it turned out that a typical accessor/getter for attributes would return a pcommon.Map. The OTTL functions then change this map and pass it to the accessor/setter.
Problem
Some of the OTTL functions assume that changes to the attributes map returned by the getter automatically change the profiles data without calling the setter.
For example here
So the changes are never written to the pprofile.Profile in this case.
Possible solution
Just from my limited knowledge... better solution possibly exist.
- identify all places were this assumption is wrong
- change the OTTL functions signature to take a GetSetter instead of a Getter and call the setter.