Currently app level aggregation is done every 15 seconds.
And we consider last reported metric value for each entity belonging to an app for aggregation.
We however merely update the corresponding metric values for the entity on put. We never remove the entries.
But it is possible that multiple entities finish during lifetime of an application. We however continue to consider them till the end.
We should however not consider metric values of entities unless reported within the 15 second period.
Consider containers. For a long running app, several containers would start and end at various times during the lifetime of an app.
To consider metrics for all the containers throughout the lifetime of app, hence wont be correct.