1. A method for automatically instrumenting application code for collecting information during actual use of the application code by field users, the method comprising: inserting, at a device, additional code into the application code for one or more logging functions or one or more event handlers to log events, wherein inserting the additional code into the application code comprises adding a logger library to the application code that exports one or more logging functions and one or more event handlers, and further comprising adding a detour library to provide a detour code; generating, upon execution of the application code with the additional inserted code on the device, trace data for at least one of user interface manipulations, execution of threads, asynchronous calls and callbacks, or user interface updates; uploading the trace data to a server for analysis of the trace data to estimate bottlenecks in execution of the application code; and receiving, at the device, the estimated bottlenecks based on the analysis.