To able to do distributed tracing using RUM and Java Agent?

Hi,
Initially, I have used nodejs and Java APM for distributed tracing and this is working fine.
Now I want to add front-end RUM to capture real-time data.
I install RUM using the following command:
npm install @elastic/apm-rum --save
And added configuration in index.js file as:
import { init as initApm } from '@elastic/apm-rum'
const apm = initApm({
serviceName: 'test_rum',
serverUrl: 'http://localhost:8200',
})

Now, when i start my node code, i get an error message "APM: Platform is not supported!"

Node version: v8.10.0

Hi Praveen,

RUM agent code should be run in the browser and not through Node.js since we don't support that environment. If you can bundle the index.js file and use it run it inside the web page, It will work as expected.

You can try out with script tag if you do not want to build and create bundles for your application.

https://www.elastic.co/guide/en/apm/agent/js-base/current/getting-started.html#using-script-tags

Let us know if you need help.

Thanks,
Vignesh

But is this article, they show to use RUM as dependency:
https://www.elastic.co/blog/performing-real-user-monitoring-rum-with-elastic-apm

????

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