open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.89k stars 2.27k forks source link

Drop processor.transform.ConvertBetweenSumAndGaugeMetricContext feature gate #34567

Open jmcarp opened 1 month ago

jmcarp commented 1 month ago

Component(s)

processor/transform

Describe the issue you're reporting

There's an alpha feature gate called processor.transform.ConvertBetweenSumAndGaugeMetricContext. But the feature seems straightforward and works well, as far as I can tell. Has it been available long enough to drop the feature gate?

github-actions[bot] commented 1 month ago

Pinging code owners:

TylerHelmuth commented 1 month ago

Thanks for reminding me about this gate. We should continue forward through the standard feature gate process: https://github.com/open-telemetry/opentelemetry-collector/tree/main/featuregate#feature-lifecycle

ernest-liftoff commented 6 days ago

hello, using 0.108 collectors, i can no longer use the convert_gauge_to_sum function.

is this expected?

Error: invalid configuration: processors::transform/correct_temporality: unable to parse OTTL statement "convert_gauge_to_sum(\"cumulative\", true)": undefined function "convert_gauge_to_sum"
2024/09/05 05:40:52 collector server run finished with error: invalid configuration: processors::transform/correct_temporality: unable to parse OTTL statement "convert_gauge_to_sum(\"cumulative\", true)": undefined function "convert_gauge_to_sum"
wildum commented 6 days ago

That's because the feature gate "processor.transform.ConvertBetweenSumAndGaugeMetricContext" was switched from Alpha to Beta. In Alpha stage, the gate is disabled by default but in Beta stage it is enabled by default. If you want the same behavior as before, you need to disable it explicitly: --feature-gates -processor.transform.ConvertBetweenSumAndGaugeMetricContext

wildum commented 6 days ago

else you need to change the context. It's not on the "datapoint" context anymore but on the "metric" context that these functions should be used. I think that the readme update was forgotten: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor I will create a PR