[processor/transformprocessor] Unexpected behaviour when setting resource attributes #36360
Labels
bug
Something isn't working
needs triage
New item requiring triage
processor/transform
Transform processor
Component(s)
processor/transform
What happened?
Description
Only the last event record change will be persistent when modifying a
resource
attribute on a log record.Steps to Reproduce
Set up a file log receiver and use a transport processor in the pipeline like this:
The file log receiver "sometimes" emits the logs in "batches" with the same resource "header"
Expected Result
Actual Result
I assume that the setter does not clone the resource & scope part on modification which makes the individual log records to overwrite each resource context.
Collector version
0.104.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
The text was updated successfully, but these errors were encountered: