What kind of sensor should I use?

Of course - but in this case it tends to be a human that does the emptying of the bag, and in most practical situations it's that vary human that also needs to be notified of the bag being in need of refill.