I have setup a SQL Server trace to capture long running queries on my SQL Server 2014 box and added Showplan XML event to capture the execution plan of the queries. The trace was created with duration filter. During the testing, I found that Showplan XML didn't take duration filter into account and was showing execution plan for all queries. I was expecting only the queries with my duration filter and their execution plans in the trace. However, this was not the case. It was showing duration filter queries correctly but the execution plan was getting logged for all the queries.
Does anyone know how to get around this problem in SQL Server trace?