Open tiffanny29631 opened 1 month ago
Pinging code owners:
processor/metricstransform: @dmitryax
See Adding Labels via Comments if you do not have permissions to add labels yourself.
I'm observing the same problem. I was wondering why the Honeycomb-provided config was reporting 640 distinct CPU events, and it turns out that all the aggregations are just being ignored. I resolved the problem by downgrading to Version 0.105.0 - now those 640 events are aggregated down to a single one. I'm guessing that #33655 introduced this bug, seeing as it replaced the event aggregation functions with a completely different code path.
A potential hack: Latest observation if v0.106 is using a no_op_label instead of label_set:[]
or omitting the field can bypass the issue.
Looking at https://github.com/open-telemetry/opentelemetry-collector/blob/main/pdata/pcommon/slice.go#L125 if a given element in label_set does not exist in the original slice, f
would still return true indicating the label is to be removed but the re-slice would ignore as the element cannot be found, meanwhile other labels could get aggregated out as designed.
Component(s)
processor/metricstransform
What happened?
Description
We are upgrading from 0.102.0 to 0.106.0 for CVE fixes and encountered a behavior change in the mentioned processor. With the configuration we have the expectation is no label remains for the metric after aggregation operation, but now all labels fall through and get exported.
When looking at the code previous filter skips if label_set is nil and refactored code skips if length is 0.
I did not find the change of this behavior in the release note, was it intentional? If yes, would omitting this field work? I've tried explicitly setting label_set to nil and the filter is still not working as expected.
Steps to Reproduce
Install otelconribcol 0.102.0 with our ConfigMap, everything works fine;
Upgrade to 0.106.0, the metric that has
labe_set:[]
starts to getting rejected by our back end as unrecognized labels received.Expected Result
With
label_set:[]
all labels associated with a metric are filtered out.Actual Result
With
label_set:[]
all labels associated with a metric remain.Collector version
0.106.0
Environment information
Environment
GKE cluster 1.29.6-gke.1254000
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response