APM service is unable to record backend process

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.

Is the scheduling framework one of the ones we support? If not, it won't get auto-detected by the agent

I know how to solve it, thank you. Add the following parameter during startup

-Delayic.apm.trace_ Methods=com. qx367. common. Elasticjob. TimerTask#*

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