record samples during gc
simple middleware