The trace bullet are CGI. And probably are very easy to make. Just watch this Connan segment where they add the bullets at 4m 10sec mark.
The bullets holes are usually made with small controlled explosions. So the holes are real, just not really dangerous. But also can be made with CGI.
Very basic / Low Budget example:
if you want see how a real machine gun will looks like on this case. Check this mythbuster video: