#10 Modified implementation for metric aggregation. Configured separate databases for events and metrics.