In The Wire, Bubbles was a drug addict who was a grass for Detective Greggs and other Balitmore cops. He was instrumental in providing evidence to help convict members of the Barksdale gang.
He seemed to be pretty open about it. He told his friend Johnny, who was beaten up by the Barksdale gang, what he was doing.
Bubbles: I'd have come past sooner, but I been on kinda like a mission.
Johnny: A mission?
Bubbles: Yeah. Them hoppers that beat you down they got problems now. Them and the people they sling for, even.
Johnny: What?
Bubbles: I put the police on their ass.
Johnny: Police? What, you get locked up or something?
Bubbles: No, come on. No, I'm not working for them. I'm working with them. They don't give me the badge soon enough, I keep doing like I do.
Johnny: Why?
Bubbles: What do you mean why? How can you ask me why? Why the fuck are you in here, man, with all these falling-down motherfuckers? Why you passing shit through a bag? Why they beat you down? Why I couldn't do nothing about it?
Arguably Johnny wouldn't have dropped him in it, but we learnt from Omar that it was common knowledge Bubbles is Greggs' informant.
Omar: Saying, you trying to catch up with Bird? Word is he dropped a workin' man.
McNulty: Wait, hold up. Come on, don't play me. What workin' man, what Bird?
Omar: Come on, now, ain't but one working man, now, is there? And Bird? I think your snitch can handle that. Shit, Bubbles know Bird.
So, given it was street knowledge that Bubbles was an informant, why didn't the Barksdale gang kill him? They had already killed someone for working with the police, so why not Bubbles?