Implement get metrics task.