Implement log aggregation in React | Elastic Interview Question