function to get metric by its name added.