Code to add metrics to db added