Created Metric class to talk to the backend.