# Server Side Rendering and distributed tracing

**URL:** <https://discuss.elastic.co/t/server-side-rendering-and-distributed-tracing/199986>\
**Category:** APM\
**Tags:** nodejs, rum\
**Created:** [September 18, 2019, 11:20am UTC](https://discuss.elastic.co/t/server-side-rendering-and-distributed-tracing/199986 "2019-09-18T11:20:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davodesign84](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davodesign84/32/54409_2.png) [@davodesign84](https://discuss.elastic.co/u/davodesign84)\
**Post date:** [September 18, 2019, 11:20am UTC](https://discuss.elastic.co/t/server-side-rendering-and-distributed-tracing/199986/1 "2019-09-18T11:20:06Z")

</div>

Hi there,

we are trying to implement distributed tracing on our frontend APM, however we are using SSR and that causes the first page load to miss useful tracing information.

'page-load' example:  
 ![Screenshot_2019-09-18 articles](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fe89f0bc17b7ee2e9e981d92bdd409645aac758a.png)

'route-change': example:  
 ![Screenshot_2019-09-18 communities](https://us1.discourse-cdn.com/elastic/original/3X/5/b/5bcad6b39393841cde35e84c391eed3475f53541.png)

The application is built with Nextjs and react, as well as using a zeit now serverless deployment.

Should we initialise with the node agent instead of the js agent on the server side or is there something else I'm missing?

---

<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:** [September 18, 2019, 1:16pm UTC](https://discuss.elastic.co/t/server-side-rendering-and-distributed-tracing/199986/2 "2019-09-18T13:16:44Z")

</div>

Hi Davide,

Thanks for reaching out. You just need a bit of config changes for the page-load transaction from the Node.js agent side. You can find the relevant information on this issue comments [https://github.com/elastic/apm-agent-rum-js/issues/425#issuecomment-532648711](https://github.com/elastic/apm-agent-rum-js/issues/425#issuecomment-532648711)

Let us know if you need any help.

Thanks,  
Vignesh

---

<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:** [October 9, 2019, 9:16am UTC](https://discuss.elastic.co/t/server-side-rendering-and-distributed-tracing/199986/3 "2019-10-09T09:16:45Z")

</div>

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