stats plugin: isolate stats events and mix in a container when necessary