I'm trying to use extended events to track queries that never complete using Event Pairing as a target. (see this question I asked a few days ago). The event pairing target should let me find queries that started but never completed.
My new problem is that I need to know what else was happening on the server when this event happens. I'd like to execute a stored procedure like sp_who, sp_who2, sp_WhoIsActive, etc. whenever I find a query that has not completed in 20+ seconds, for example. Is this possible?