Can APM monitor what user actions in the web page?

Kibana version: 7.3.2

Elasticsearch version: 7.3.2

APM Server version: 7.3.2

APM Agent language and version: 4.2.2

Browser version: 77.0.3865.90

Original install method (e.g. download page, yum, deb, from source, etc.) and version: cannot recall

Fresh install or upgraded from other version? 7.1.1

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed the index pattern, generated custom templates, changed agent configuration etc.


In the default Elastic APM, some transactions have the duration as milliseconds and others have it as microseconds, but in the discover page, under apm-* index pattern, all transactions are in microseconds. Can someone please confirm this?

Also, few questions regarding APM behavior.

  1. Does APM only monitor the endpoint transactions that occur or can it also monitor the actual latency of the web page for the user?
  2. Is there any way to know what user sent the request and what user is viewing the current web page?


The RUM agent handles the browser-side monitoring, and will form a distributed trace with the server instrumentations. With the distributed trace and custom context you could correlate activity to a given user.

1 Like

@stephenbelanger, I appreciate your feedback. I looked into RUM which is provided for javascript agent. I had some problems setting it up. I didn't know where exactly I should place this configuration inside this link, could you please provide some clarification?

Also, is it possible to use RUM for Python agents as well?

Hi @EZprogramming,

Thanks for reaching out.

The configuration you've referenced is for the configuring APM server on one of your servers. Please see Getting started guide for more on how to install and configure the APM server.

However, using Real User Monitoring feature, requires installing the RUM agent in your JavaScript web application as well. Please see Getting started for more on this.

The RUM agent is a separate component that can be use on any JavaScript. We also have a Python agent that can help you monitor your Python applications. You need to setup these components separately, but they can communicate to provide distributed tracing.


1 Like

@Hamidreza, thanks for your response. My teammate and I are still trying to figure out setting up RUM for the Javascript agent, but my concern is if single web page web applications written in with React framework can send RUM data to Elasticsearch? There is no routing involved, so I'm worried if it can work in this situation.

Also, I tried to enable RUM within APM using the apm.yaml file in Elastic Cloud for my deployment. When I save the change, the deployment starts to configure itself according to the stated changes, so I know it is working and there is no error. However, when I go back to apm.yaml file I don't see those configurations, it is like they have disappeared and they don't exist anymore. Do you know what might be causing this issue? Is it related to syntax or is it just the way it behaves? Also, how do I know if the changes are enabled and they are working?

The RUM agent React integration works with react-router, therefore if there are no routing in the application, the React integration won't create any route change transactions. However, You can still use the Custom transaction API to create transactions as necessary.

Regarding the cloud deployment, which configurations are you trying to set?

1 Like

Thanks for clarifying that.

This is the configuration code in this configuration:

apm-server.rum.enabled: true
apm-server.rum.event_rate.limit: 300
apm-server.rum.event_rate.lru_size: 1000
apm-server.rum.allow_origins: ['*']
apm-server.rum.library_pattern: "node_modules|bower_components|~"
apm-server.rum.exclude_from_grouping: "^/webpack"
apm-server.rum.source_mapping.enabled: true
apm-server.rum.source_mapping.cache.expiration: 5m
apm-server.rum.source_mapping.index_pattern: "apm-*-sourcemap*"

It seems like Elastic doesn't save the configurations in the apm.yml file once I update my deployment. I also don't get any errors, but when I got back to the file, it is missing those configurations.

Please follow this guide for configuring custom setting for APM Server on cloud. It lists how to configure the settings and also which settings are available on cloud.

Settings customized in the User settings overrides section still show up if you go back to your deployment at a later time.

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