I have setup a 6.4 APM server for testing RUM with the javascript code. I am testing this on an Atlassian Confluence instance using it's Custom HTML feature to load and initialize RUM.
My apm-server.yml looks like this (removed the comments). I have both frontend and rum in the config under apm-server as documentation said it should be rum but the reference config file only shows frontend:
apm-server:
host: "0.0.0.0:8200"
frontend:
enabled: true
rate_limit: 100000
allow_origins: ['*']
library_pattern: "node_modules|bower_components|~"
exclude_from_grouping: "^/webpack"
source_mapping.cache.expiration: 5m
source_mapping.index_pattern: "apm-*-sourcemap*"
rum:
enabled: true
rate_limit: 100000
allow_origins: ['*']
library_pattern: "node_modules|bower_components|~"
exclude_from_grouping: "^/webpack"
source_mapping.cache.expiration: 5m
source_mapping.index_pattern: "apm-*-sourcemap*"
ssl.enabled: true
ssl.certificate : "D:/Applications/Elastic/APM-Server/vanderlande.com.pem"
ssl.key : "D:/Applications/Elastic/APM-Server/vanderlande.com.key"
setup.template.settings:
index:
number_of_shards: 1
codec: best_compression
setup.kibana:
host: "srv02182.vi.corp:5601"
output.elasticsearch:
hosts: ["srv02182.vi.corp:9200"]
indices:
- index: "apm-%{[beat.version]}-sourcemap"
when.contains:
processor.event: "sourcemap"
- index: "apm-%{[beat.version]}-error-%{+yyyy.MM.dd}"
when.contains:
processor.event: "error"
- index: "apm-%{[beat.version]}-transaction-%{+yyyy.MM.dd}"
when.contains:
processor.event: "transaction"
- index: "apm-%{[beat.version]}-span-%{+yyyy.MM.dd}"
when.contains:
processor.event: "span"
The code I put in the Custom HTML for Confluence:
elasticApm.init({
serviceName: 'vikipedia-acc',
serverUrl: 'https://elastic-apm.vanderlande.com:8200',
})
I am seeing Page Load data on this service so connection seems to be working. However the first time I access the application in a new session (browser restart or new tab) the js file loads in 24ms but than the initialization (presumably) takes 1 minute. Subsequent actions on the application do not show this 'delay'.
Here is a screenshot from the client
What could be causing this (what seems like a timeout somewhere). How could I troubleshoot this?