added callback function to the metrics xml