Monitoring of private method and other method that are not directly associated to an HTTP endpoint


First thank you for your amazing work on all your products.

I've configured an APM server (6.4.0) and deployed the JAVA agent (0.6.2) on some of our apps.
Everythings runs good, I have the stats on our HTTP endpoint (Controller).

My question is : if I want a more detailled monitoring (for example, private method or method in Service class), should I use the API to create custom Transaction or is there going to be the functionnality in a future release?

If the method you want to monitor is already part of a transaction, you can use the API to get the current transaction and add another span to it.

We have thought about adding an annotation-based approach to that, but we don't have concrete plans. If you have any suggestions, feel free to voice them :slight_smile:

Thanks for your reply!

An annotation-based approach to define custom span? That's sound great. I think we're going to implement something like that to see how it works :slightly_smiling_face:

I don't know how much infos is avaiable to the java agent, but I was thinking about having a sort of treeview to see the call hierarchy. JProfiler for example give this kind of infos when you ask it to monitor CPU usage :


I don't know about the feasibility and the ressource consumption though. :upside_down_face:

As the Elastic APM agent is primarily designed to run with very low overhead in production, I don't think it would be a good idea to create a span for every method call in the application.

But we might integrate with a sampling-based profiler in the future.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.