I am using a java MVC Based application built on jdk 17 version.
After configuring the ELK agent with application and checking the stacktraces, Its observed that some methods are not captured in the transaction spans.
Example:
I have a Implementation clas AbcImpl.java which has method xyz().
The method xyz() , in its implementation has a dao.findbyName() method. This dao is annotated with @Autowired . The DAO Interface ,which is annotated with @Repositoryextends CrudRepository and has the interface method findbyName().
In the agent stack trace, although I am able to capture the traces for rest of the methods the dao method findbyName() are not captured in the stacktraces.
Is there any way we can track these repository methods?
I assume it's not a supported technology, (as then it should be captured). So you can explicitly trace methods to capture the specific methods you want to track
@Jack_Shirazi Thanks. Configuring trace_methods gave me the custom methods that were getting filtered initially. But this did not provide me the DAO methods like findById() ,findByName() etc.
I think the problem here is that the actual implementation of the @Repository interface is a spring-generated proxy class, which we exclude from instrumentation.
Could you provide the name of the spring-generated implementation for your @Repository interface (e.g. based on a stacktrace), so that I can verify this?
I would need the name of the class implementing your @Repository interface.
E.g. in a class where your respository is injected via @Autowired invoke .getClass().getName() on the autowired repository instance and post the result here. This will be the name of the spring-generated class implementing your @Repository interface.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.