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

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
Status code: 200

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

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

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

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