Well, we have lived with the same problem for a long time. In Plumbr we are making your lives easier by surfacing the sources of the problems. As a sample – when you happen to have a memory leak in your application, we tell you where the leaking objects are created. Down to the line in source code where the object was created. But we have not been able to hand over the whole call stack so far – it is just too expensive to gather this information during the application runtime.

But there is a very nice tool available just for the task at hand called BTrace. This is a dynamic tracing tool which you can attach to your Java process during runtime to acquire a call stack and then disconnect when you have acquired the information you needed. BTrace dynamically instruments the class bytecode in the target application in order to inject tracing code. You can use the same tool for other amazing purposes, but for the sake of clarity, lets just stick with this feature.

In order to check out the full case study we conducted using a freely available sample application, read further from http://plumbr.eu/blog/who-is-calling-this-method