What are these green bags I see stapled to trees in California?

As I drive and walk around places I see these green bags stapled to trees. What are they? I never stopped to look. I figured dopers here would know what they are.

I don’t live in CA, and have never seen this anywhere done. However, the first guess that immediately came my mind was:

They’re there for people to use to pick up dog poo.

Insect traps, most likely. They come in a variety of forms. As it turns out, the Wikipedia article features a picture of exactly the type I think you’re referring to:

http://en.wikipedia.org/wiki/Insect_trap

The county came by and stuck a yellow sticky trap on a tree in my yard when they were monitoring for glassy winged sharpshooters.

That’s exactly what I see. Thanks yabob!

Here in Washington they use the same traps shown to trap Gypsy Moths. I guess they put them all over because Gypsies don’t have physical addresses.

Green bags are for the Americanized Irish leprechauns to put their gold in, pots being non-biodegradable and not nuts and twigsy enough for us Californians. Look in them first before sticking yer mits in. If someone has already “borrowed” the gold, you don’t want to get a handful of glue the wee folk use to try to keep the gold in the bags. That’s why they say theives in California have “sticky fingers”.
But seriously, they are insect traps, usually for fruit flies. Wee fruit flies, but insects nonetheless.

Lookin’ back on the track for a little green bag,
Got to find just the kind or I’m losin’ my mind

Out of sight in the night out of sight in the day,
Lookin’ back on the track gonna do it my way.

I recently purchase some snake oil calling itself “squirrel chasers” and they were in small green bags to hang on trees and whatnot. I call it snake oil because the squirrels seemed to enjoy batting it around and playing with what was supposed to deter them.