We are evaluating Elastic APM as the APM solution for a newly built project at a customer. The experience so far has been great, with a small nuance.
We are using Spring Boot with a three-tier approach: @Controller, @Service and @Repository annotated classes. To my surprise, only the rest endpoints (@Controller) get discovered. To add additional spans, we need to add them manually via the API (tested, works great). We've tried to configure the flag elastic.apm.trace_methods to monitor all methods of all classes of the base package but does not seem to work.
Are we doing something wrong or is this the expected behaviour?
Kibana version: 7.0.0
Elasticsearch version: 7.0.0
APM Server version: 7.0.0
APM Agent language and version: Java 1.6.0
Original install method (e.g. download page, yum, deb, from source, etc.) and version: Docker running on Kubernetes
Fresh install or upgraded from other version?: Fresh install
Thank you so much for such a speedy reply. When I enabled it it shows some more data that I will have to anonymise. Will prepare a sandboxed application that will be easier to debug this on and share the logs with you as soon as I can. Thanks again!
We've temporarily worked around this by setting the following trace_methods, but we would also prefer a way to specify all @Service's public methods similar to how @Controller methods are automatically captured.
Sorry for the delay to your such quick note Felix.
We are using something like this:
-Delastic.apm.trace_methods=com.example.*
Question: does the wildcard match sub packages? We are using our base package here, but then we have .service, .repository, etc. This could potentially be the issue if we're trying to use something that does not work the way we are assuming.
Sorry for the late reply once again, but many other topics came in. I think we might have done something wrong in our initial service, because on this second that I built for debugging purposes the trace_methods work!
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.