Managing events capture to troubleshoot problems