[BUG] metricsgeneration/infinite loop #37474
Labels
bug
Something isn't working
needs triage
New item requiring triage
processor/metricsgeneration
Metrics Generation processor
Component(s)
processor/metricsgeneration
What happened?
Description
When using destination and metric1 with equal values (same metric) the processors enters an infinite loop.
Steps to Reproduce
In a perfect scenario, when using the scaling operations, I would like to change the selected metric "in-place". However, if we set metric name equal name, the processor enters in infinite loop.
Config shown below.
This happens because we iterate over the metrics array, and if we find a atching metric, we scale it based on the operation and we "ADD IT" to the ongoing metrics array. If the metrics names are equal this causes never ending loop.
Expected Result
Replace/update metric in-place. If thiscould be a desired behaviour for the config above, I can submit a PR.
Actual Result
Infinite loop in processor.
Collector version
0.118.0
Environment information
Environment
N/A
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: