Suppose I have a Java server application, which I don't understand. I would like to know the whole execution sequence of the request processing (see example below)
received HttpRerquest 12345 from client (...) with headers (...) and body (...) enter WebUserController with HttpRequest 12345 enter UserProcessor.process1 with HttpRequest 12345 enter UserProcessor.process2 with createUserRequest(userName=..., userEmail=..., ...) enter userDAO.createUser with User(userName=..., userEmail=..., ...) invoke SQL statement (...) against database (...) in <host>::<port> exit userDAO.createUser with result (...) exit UserProcessor.process2 with (...) exit UserProcessor.process1 with (...) exit WebUserController with ... sent HttpResponse 7890 to client (...) with headers (...) and body (...)
I am aware about only one way to get it: add trace calls to the application code manually. Now I wonder if there is an automatic way to add those trace calls to the code. I am thinking about byte instrumentation, which would add the trace calls to all public methods of all public classes in given jars. Does it make sense ?
Could you suggest any other way to understand how the application works?