go-graphite / carbonapi

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

feat(functions): add a config option to pass consolidateBy to the storage backend #830

Closed mchrome closed 3 months ago

mchrome commented 3 months ago

This PR is mostly a copy of #793. Passes consolidateBy with its argument to the backend through the FilteringFunctions field. Only works with carbonapi_v3_pb protocol. Fixes broken tests and removes passing ConsolidationFunc field further after parsing the target in Fetch. This is needed since this field is empty during evaluation and "values" map will not return anything. In addition I added an option to the config to enable this behavior.