apm-agent-rum-js
apm-agent-rum-js copied to clipboard
[Question] JS Agent for APM Cloud
This is probably a misunderstanding on our end but I'd like to clarify whether the agent works with APM Cloud as well?
We tried implementing it through CDN with the serverUrl pointing to the APM Cloud endpoint on Google Cloud.
<script src="https://cdn.jsdelivr.net/npm/@elastic/[email protected]/dist/bundles/elastic-apm-rum.umd.min.js" crossorigin></script>
<script>
elasticApm.init({
serviceName: 'Dummy',
serverUrl: 'https://xxx.us-east1.gcp.elastic-cloud.com:9243',
})
</script>
But we get an error since the /intake/v2/rum/events does not exist on APM Cloud when trying to reach it directly (browser).
https://xxx.us-east1.gcp.elastic-cloud.com:9243/intake/v2/rum/events
(or 8200)
We also applied the following custom settings for APM Cloud server configuration, just in case:
Set apm-server.rum.enabled to true
Set apm-server.rum.event_rate.limit to 300
Set apm-server.rum.event_rate.lru_size to 1000
Set apm-server.rum.allow_origins.0 to *
Set apm-server.rum.allow_headers.0 to header1
Set apm-server.rum.allow_headers.1 to header2
Set apm-server.rum.library_pattern to node_modules|bower_components|~
Set apm-server.rum.exclude_from_grouping to ^/webpack
Set apm-server.rum.source_mapping.enabled to true
Thanks @sabatale and sorry about the slow response.
Would you please post the error you see in the browser devtool console?
You need to use the APM url not the elasticsearch URL / port.