Added custom metrics support