Currently, the flatten function seems to not flatten the attributes of nested objects within a slice, but rather leaves the objects within the slice unchanged.
Steps to Reproduce
Consider the following input for the flatten function:
{
"things": [
{
"name": "a"
}
]
}
And use the flatten function:
flatten(attributes)
Expected Result
The result should be fully flattened:
{
"things.0.name": "a"
}
Actual Result
The index of the individual objects within the slice is put into the attribute keys (which is expected), however the flattening is not applied to the nested objects:
Pinging code owners for pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley. See Adding Labels via Comments if you do not have permissions to add labels yourself.
Component(s)
No response
What happened?
Component(s)
pkg/ottl
What happened?
Description
Currently, the
flatten
function seems to not flatten the attributes of nested objects within a slice, but rather leaves the objects within the slice unchanged.Steps to Reproduce
Consider the following input for the
flatten
function:And use the
flatten
function:Expected Result
The result should be fully flattened:
Actual Result
The index of the individual objects within the slice is put into the attribute keys (which is expected), however the flattening is not applied to the nested objects:
Collector version
v0.112.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
Collector version
v0.112.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response