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

**URL:** <https://discuss.elastic.co/t/to-able-to-do-distributed-tracing-using-rum-and-java-agent/195186>\
**Category:** APM\
**Tags:** rum\
**Created:** [August 14, 2019, 10:43am UTC](https://discuss.elastic.co/t/to-able-to-do-distributed-tracing-using-rum-and-java-agent/195186 "2019-08-14T10:43:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pksinghal](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pksinghal](https://discuss.elastic.co/u/pksinghal)\
**Post date:** [August 14, 2019, 10:43am UTC](https://discuss.elastic.co/t/to-able-to-do-distributed-tracing-using-rum-and-java-agent/195186/1 "2019-08-14T10:43:24Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [August 14, 2019, 10:50am UTC](https://discuss.elastic.co/t/to-able-to-do-distributed-tracing-using-rum-and-java-agent/195186/2 "2019-08-14T10:50:38Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![pksinghal](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pksinghal](https://discuss.elastic.co/u/pksinghal)\
**Post date:** [August 16, 2019, 4:23pm UTC](https://discuss.elastic.co/t/to-able-to-do-distributed-tracing-using-rum-and-java-agent/195186/3 "2019-08-16T16:23:23Z")

</div>

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

????

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 9, 2019, 8:03am UTC](https://discuss.elastic.co/t/to-able-to-do-distributed-tracing-using-rum-and-java-agent/195186/5 "2019-09-09T08:03:31Z")

</div>

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