clean up metric deployment code