Extract Product Analytics metrics aggregation out of HLLRedisCounter module
requested to merge mwaw/273391-extract-product-analytics-metrics-aggregation-out-of-hllrediscounter-module into master
What does this MR do?
For purpose of enhancing Aggregated Metrics feature with ability to calculate aggregates over metrics sourced from database, code that already implemented this feature had to be extracted and made metrics source oblivious. This MR achieves that by implementing following changes:
- Extracted new module
AggregatedMetrics
that will house whole Aggregated Metrics feature - Within new namespace it moves logic responsible for calculation aggregated metrics data from
HLLRedisCounter
intoAggregate
class. Creating interface for integrating other sources in the future withcalculate_events_union
method. In the following MRs it is planned to replace direct call toHLLRedisCounter
with adapter class, as well as adding separate adapter class for database sourced metrics, sketch of that architecture is provided at follow up MR !52784 (merged)
Other changes:
- Added missing error handling to Aggregated Metrics feature, in order to avoid breaking whole Usage Ping collection process when some aggregates has been incorrectly defined (return standard fallback value of
-1
for such cases)
It implements #273391 (closed).
Does this MR meet the acceptance criteria?
Conformity
-
[ ] Changelog entrychange without any user facing effects -
[ ] Documentation (if required)Comprehensive update to documentation about enhancement of aggregated metrics will be delivered at #299326 (closed) -
Code review guidelines -
Merge request performance guidelines -
Style guides
Edited by Mikołaj Wawrzyniak