# Https backend call is not captured as transaction.type: http-request by RUM javascript agent

**URL:** <https://discuss.elastic.co/t/https-backend-call-is-not-captured-as-transaction-type-http-request-by-rum-javascript-agent/339458>\
**Category:** APM\
**Tags:** rum\
**Created:** [July 27, 2023, 3:47pm UTC](https://discuss.elastic.co/t/https-backend-call-is-not-captured-as-transaction-type-http-request-by-rum-javascript-agent/339458 "2023-07-27T15:47:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dacothe](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dacothe](https://discuss.elastic.co/u/dacothe)\
**Post date:** [July 27, 2023, 3:47pm UTC](https://discuss.elastic.co/t/https-backend-call-is-not-captured-as-transaction-type-http-request-by-rum-javascript-agent/339458/1 "2023-07-27T15:47:11Z")

</div>

**Kibana version** : 7.16.3

**Elasticsearch version** : 7.16.3

**APM Server version** : 7.16.3

**APM Agent language and version** : @elastic/apm-rum:5.12

**Browser version** : Chrome 110.0.5481.100

**Is there anything special in your setup?** no special setup conditions

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

Hi all!  
We are using the javascript rum agent for monitoring our web application and have noticed that the RUM agent does not record all https calls to the backend as transaction type `http-request`.

Example: Calling a service via POST method.  
Target url: [https://mySystem.de/api/cl2/sessions/f79eb2a7-17e7-4c42-a2df-fa41d2aee835/process/mvp.processes.mvpDiagnoseStartCare](https://mySystem.de/api/cl2/sessions/f79eb2a7-17e7-4c42-a2df-fa41d2aee835/process/mvp.processes.mvpDiagnoseStartCare)  
Status code: 200

This call is captured by the Rum Agent as a span in a transaction of the type `route-change`.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bf6e4909af4160fc58058901c9f856bb5b225ebb.png)

It is expected that a transaction of the type `http-request` will be created in addition, which unfortunately does not happen. For other http calls to the backend, however, the transaction of the type 'http-request' is created.

No errors in any log file. Can anybody explain the actual behaviour of the agent ?

Thanks in advance!

Thilo

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [July 27, 2023, 4:26pm UTC](https://discuss.elastic.co/t/https-backend-call-is-not-captured-as-transaction-type-http-request-by-rum-javascript-agent/339458/2 "2023-07-27T16:26:11Z")

</div>

Hi @dacothe,

This is indeed the intended behaviour of the RUM agent. There are three distinct transaction types captured by the agent in the order of priority.

1. If there is a navigation that causes the page load activity, the agent captures them as `page-load` transaction.
2. Any subsequent page transitions or SPA navigations that causes change in URL caused by Click/Form Submit gets captured as `route-change` transaction.
3. If there are no navigation related events and there are some network requests to the backend that was caused by polling, etc. the agent groups them under `http-request`.

In your example, it seems like there is a URL change activity that triggered the POST request which then gets associated with the `route-change` transaction.

You can disable specific transaction types by specifying `disableInstrumentations: ["route-change]"`, but i would not recommend as there might be some missed events as a result of navigations.

Thanks,  
Vignesh

---

<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:** [August 24, 2023, 4:26pm UTC](https://discuss.elastic.co/t/https-backend-call-is-not-captured-as-transaction-type-http-request-by-rum-javascript-agent/339458/3 "2023-08-24T16:26:52Z")

</div>

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