Added metrics collection