Adding structured query trace