Skip to content

Extract Product Analytics metrics aggregation out of HLLRedisCounter module

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:

  1. Extracted new module AggregatedMetrics that will house whole Aggregated Metrics feature
  2. Within new namespace it moves logic responsible for calculation aggregated metrics data from HLLRedisCounter into Aggregate class. Creating interface for integrating other sources in the future with calculate_events_union method. In the following MRs it is planned to replace direct call to HLLRedisCounter 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:

  1. 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

Edited by Mikołaj Wawrzyniak

Merge request reports