NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Set up Real User Monitoring (RUM) support
editSet up Real User Monitoring (RUM) support
editThe JavaScript RUM Agent offers real user monitoring (RUM) support.
Example config with RUM enabled:
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.cache.expiration: 5m apm-server.rum.source_mapping.index_pattern: "apm-*-sourcemap*"
Configuration
editenabled
editTo enable RUM support, set apm-server.rum.enabled
to true
.
By default this is disabled.
Configuration options: v1 RUM endpoint [6.5] Deprecated in 6.5.
editVersion 6.5 of the APM Server introduced a new intake API. You can learn more about this change in the intake API changes documentation.
If you do not upgrade your APM Agent, you’ll continue to use the deprecated v1 RUM intake API endpoint, and thus, the following configuration options.
rate_limit
[6.5]
Deprecated in 6.5.
editRate limit per second and IP address for requests sent to the RUM endpoint.
If the rate limit is hit, the APM Server will return an HTTP status code 429
.
The rate limit cannot be disabled. Ensure to have it set to a number suiting your requirements.
Default value is set to 10.
Configuration options: v2 RUM endpoint
editVersion 6.5 of the APM Server introduced a new intake API. You can learn more about this change in the intake API changes documentation.
The following configuration options only affect users that have upgraded their agent to take advantage of the new v2 intake API.
event_rate.limit
editDefines the maximum amount of events allowed to be sent to the APM Server v2 RUM endpoint per ip per second. Defaults to 300.
event_rate.lru_size
editAn LRU cache is used to keep a rate limit per IP for the most recently seen IPs. This setting defines the number of unique IPs that can be tracked in the cache. Sites with many concurrent clients should consider increasing this limit. Defaults to 1000.
Configuration options: general
editallow_origins
editComma separated list of permitted origins for RUM support.
User-agents send an Origin header that will be validated against this list.
This is done automatically by modern browsers as part of the CORS specification.
An origin is made of a protocol scheme, host and port, without the URL path.
Default value is set to ['*']
, which allows everything.
library_pattern
editRegExp to be matched against a stacktrace frame’s file_name
and abs_path
attributes.
If the RegExp matches, the stacktrace frame is considered to be a library frame.
When source mapping is applied, the error.culprit
is set to reflect the function and the filename
of the first non library frame.
This aims to provide an entry point for identifying issues.
Default value is "node_modules|bower_components|~"
.
exclude_from_grouping
editRegExp to be matched against a stacktrace frame’s file_name
.
If the RegExp matches, the stacktrace frame is excluded from being used for calculating error groups.
The default pattern excludes stacktrace frames that have a filename starting with /webpack
.
source_mapping.elasticsearch
editConfigure the Elasticsearch source map retrieval location, taking the same options as output.elasticsearch. This must be set when using an output other than Elasticsearch, and that output is writing to Elasticsearch. Otherwise leave this section empty.
source_mapping.cache.expiration
editIf a source map has been uploaded to the APM Server, source mapping is automatically applied to documents sent to the RUM endpoint. Source maps are fetched from Elasticsearch and then kept in an in-memory cache for the configured time. Values configured without a time unit are treated as seconds. Default value is 5 minutes.
source_mapping.index_pattern
editSource maps are stored in a separate index apm-%{[beat.version]}-sourcemap
by default.
If changed, a matching index pattern needs to be specified here.