1. A method, comprising, automatically instrumenting application code, including inserting one or more logging functions and one or more event handlers into the application code to log events, and inserting code into the application code to assign an identifier for an invocation of an asynchronous call and detour the callback provided to the asynchronous call to detour code to associate the callback with the asynchronous call based upon the identifier.