APM service is unable to record backend process service calls
Kibana version: 8.11.3
Elasticsearch version: 8.11.3
elastic-agent-8.11.3
elastic-apm-agent-1.45.0.jar
run jar:
java
-javaagent:$APP_PATH/elastic-apm-agent.jar
-Delastic.apm.service_name=commons
-Delastic.apm.secret_token=
-Delastic.apm.server_url=http://localhost:8200
-Delastic.apm.environment=my-environment
-Delastic.apm.application_packages=
-jar /home/project/commons-server.jar
After running, APM runs normally, and the APM service can register and display normally, as well as retrieve data, as shown in the following figure:
There is currently a question that needs to be answered:
The process executed by the JAVA backend thread task is not recorded,
Microservices: commons
Microservices: hprod
Commons has a scheduled task: What is the method to call the hprod service every 10 seconds
Scheduled(cron = "0/10 * * * * ?")
public void Every10Second() {
log.error("Every10Second query getSupplierById--start");
Hotel hotel=hprodHtlBaseApi.getHotelById(1L);
log.error("Every10Second query getSupplierById--end--getNamecn:"+hotel.getNamecn());
}
However, on the Kibana APM platform, the dependency hprod cannot be seen in the common service item
How to capture and record scheduled tasks in the background.