go-graphite / carbonapi

Implementation of graphite API (graphite-web) in golang
Other
308 stars 140 forks source link

Fix ConsolidationFunc setting #718

Closed npazosmendez closed 2 years ago

npazosmendez commented 2 years ago

We noticed some functions were setting the r.AggregateFunction directly instead of the string r.ConsolidationFunc that is then used in the GetAggregateFunction helper:

https://github.com/go-graphite/carbonapi/blob/30a090756e199c9d588499972268c4ebbb22a4e9/expr/types/types.go#L299-L310

This was leading to inconsistencies between ConsolidationFunc and AggregateFunction that were causing issues for our use case.