Is there a way to output a call trace for a particular thread in java?
I do not want a stack trace. I would like a sequence of calls on each object for tracing.
You'd basically want aspect-oriented programming of some form, where the aspect could determine whether the current thread was meant to be logging calls. (The alternative is to explicitly put the logging in every method yourself, which would be painful.)
There are plenty of AOP frameworks in Java, such as AspectJ and Spring (Spring is a lot more than AOP of course).
Applying aspects to every method call in the system could be tricky though... I don't have any experience with AspectJ, but Spring AOP is basically designed to enable AOP around the components. Classes which are effectively unknown to Spring can't be changed easily. Mind you, it's been a while since I've used even Spring AOP - things may have come on since then :)
If you're using IntelliJ, there is plugin called Flameviewer. Please find more details on the below link,
https://github.com/kornilova-l/FlameViewer#uploading-file-to-flameviewer