Optimize trace logging on dispatch