added ability to output metrics by_day, by_month, by_year