# APM service is unable to record backend process

**URL:** <https://discuss.elastic.co/t/apm-service-is-unable-to-record-backend-process/350426>\
**Category:** APM\
**Tags:** java\
**Created:** [January 5, 2024, 3:55am UTC](https://discuss.elastic.co/t/apm-service-is-unable-to-record-backend-process/350426 "2024-01-05T03:55:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![weilin](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@weilin](https://discuss.elastic.co/u/weilin)\
**Post date:** [January 5, 2024, 3:55am UTC](https://discuss.elastic.co/t/apm-service-is-unable-to-record-backend-process/350426/1 "2024-01-05T03:55:52Z")

</div>

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:

```auto

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

```auto
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.

 ![ok](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b621e3e933a2ac222dc3290cd537f2ddfac6053b.jpeg)

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [January 5, 2024, 12:42pm UTC](https://discuss.elastic.co/t/apm-service-is-unable-to-record-backend-process/350426/2 "2024-01-05T12:42:42Z")

</div>

Is the scheduling framework [one of the ones we support](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-scheduling-frameworks)? If not, it won't get auto-detected by the agent

---

<div class="post-metadata">

**Author:** ![weilin](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@weilin](https://discuss.elastic.co/u/weilin)\
**Post date:** [January 5, 2024, 1:24pm UTC](https://discuss.elastic.co/t/apm-service-is-unable-to-record-backend-process/350426/3 "2024-01-05T13:24:30Z")

</div>

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

-Delayic.apm.trace\_ Methods=com. qx367. common. Elasticjob. TimerTask#\*

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 2, 2024, 1:25pm UTC](https://discuss.elastic.co/t/apm-service-is-unable-to-record-backend-process/350426/4 "2024-02-02T13:25:20Z")

</div>

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