Flush the metrics collector periodically if no new spans arrive.