Caching agents essentially need to replicate some functionality in Apisonator. Because these agents need to take metric hierarchies into account for correctly applying limits, they need to keep track of the current counters for them. When reporting, these agents need to figure out what delta to report, that is, how much a metric was consumed.
However, this is problematic in the case of metrics that have a parent (or in newer releases even grandparents and so on), because they need to walk over the hierarchy carefully to take into account that whatever they report in a child metric will be added to in the parent, grandparent, etc.
They need to compute this because Apisonator will add to parents. This issue is a new feature request to help these agents avoid doing work that is only meant to be undone by Apisonator. That is, agents will keep a delta for each and all metrics involved in a given reporting period, but they will need to recompute the deltas with hierarchy data when "flushing" this information, that is, decreasing the delta values for parents by their children's deltas, only for Apisonator to take that and increase the parents' deltas by their childrens'.
So this feature would be adding an extension for reporting (authrep and report endpoints) in which hierarchy computation would be turned off. That is, the calling agent tells us to trust them to have correctly computed the deltas based on the current metric hierarchy for a given service.
This benefits both the agent and Apisonator: the agent won't need to touch the deltas, it will just report hits for all involved metrics, and Apisonator won't have to apply the reported values to parents (which is effectively undoing the work made by the agent).
This implies work in the aggregator so that if this extension is enabled for the reporting request we take the specified metrics values and just add one by one to our current values without any further processing.
Caching agents essentially need to replicate some functionality in Apisonator. Because these agents need to take metric hierarchies into account for correctly applying limits, they need to keep track of the current counters for them. When reporting, these agents need to figure out what delta to report, that is, how much a metric was consumed.
However, this is problematic in the case of metrics that have a parent (or in newer releases even grandparents and so on), because they need to walk over the hierarchy carefully to take into account that whatever they report in a child metric will be added to in the parent, grandparent, etc.
They need to compute this because Apisonator will add to parents. This issue is a new feature request to help these agents avoid doing work that is only meant to be undone by Apisonator. That is, agents will keep a delta for each and all metrics involved in a given reporting period, but they will need to recompute the deltas with hierarchy data when "flushing" this information, that is, decreasing the delta values for parents by their children's deltas, only for Apisonator to take that and increase the parents' deltas by their childrens'.
So this feature would be adding an extension for reporting (authrep and report endpoints) in which hierarchy computation would be turned off. That is, the calling agent tells us to trust them to have correctly computed the deltas based on the current metric hierarchy for a given service.
This benefits both the agent and Apisonator: the agent won't need to touch the deltas, it will just report hits for all involved metrics, and Apisonator won't have to apply the reported values to parents (which is effectively undoing the work made by the agent).
This implies work in the aggregator so that if this extension is enabled for the reporting request we take the specified metrics values and just add one by one to our current values without any further processing.