moved last_metrics to module scope, clarified variable naming for host_tag