add anonymous function trace