Add test cases and fix bugs.
Update operation tag in service metrics.