# RUM timeline are not align with chrome network waterfall; And RUM not work with Distributed tracing

**URL:** <https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070>\
**Category:** APM\
**Tags:** rum\
**Created:** [January 29, 2019, 2:51am UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070 "2019-01-29T02:51:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldcodeoberyn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oldcodeoberyn/32/24800_2.png) [@oldcodeoberyn](https://discuss.elastic.co/u/oldcodeoberyn)\
**Post date:** [January 29, 2019, 2:51am UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/1 "2019-01-29T02:51:34Z")

</div>

The same request, but observe different metric in elastic APM RUM and chrome develop tools

### RUM

total duration is: 1861ms  
and duration for `exahgne.json`, `symbol.json`, `data.json` are the same, 197ms

#### picture 1:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/3/236839d477586606c4821571d2607834c9b36dfa.png)

### Chrome Dev Tools

total durating is 4.77s  
the most cost request is fetching `symbol.json`, which cause 3.34s

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/0952431a331adf8c6e368662f35a2a214538a669.png)

### Not work with Distributed tracing

I have three service

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/2/928cee11c818cb805abc15f89b07d9316f4b75cc.png)  
but from picture 1 above, there one service in the transaction. They are not share the same parent trace id  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/0/409d72991c37519ec0687eb5f9a88aeb34b909e8.png)

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [January 29, 2019, 1:24pm UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/2 "2019-01-29T13:24:56Z")

</div>

Hi,

Thanks for using Elastic APM.  
Do you use polyfills in your application, for example for fetch or promises?  
Also, would you please provide your configuration for the RUM agent?

Generally speaking we add a special, `elastic-apm-traceparent`, header to http requests to communicate the trace ID. However, it seems that these requests do not have this header. Can you please, check if this header is present in the dev tools network panel.  
Also, Please make sure that the origin for these requests are added to `distributedTracingOrigins` config option, since we only add the header to http requests made to the these origins. This is only required if the request origin is different compared to the page origin.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![oldcodeoberyn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oldcodeoberyn/32/24800_2.png) [@oldcodeoberyn](https://discuss.elastic.co/u/oldcodeoberyn)\
**Post date:** [January 30, 2019, 7:22am UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/3 "2019-01-30T07:22:32Z")

</div>

Thanks for answer, the problem is cause by distributedTracingOrigins, I didn't set this config options

---

<div class="post-metadata">

**Author:** ![oldcodeoberyn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oldcodeoberyn/32/24800_2.png) [@oldcodeoberyn](https://discuss.elastic.co/u/oldcodeoberyn)\
**Post date:** [January 30, 2019, 8:19am UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/4 "2019-01-30T08:19:56Z")

</div>

> [@Hamidreza](#):
>
> elastic-apm-traceparent

By the way, If I have several service in backend behind a F5 device, how should I input the distributedTracingOrigins? put the F5 IP?

```auto
distributedTracingOrigins:['http://localhost:80','http://0.0.0.0:8080']

```

And I don't see the `elastic-apm-traceparent` header you mention above:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/092f66b0f25399ce68b9f61a6bbdd6616df6f9bf.png)

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [January 30, 2019, 1:30pm UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/5 "2019-01-30T13:30:47Z")

</div>

You should see the `elastic-apm-traceparent` header on the outgoing request to your own services (e.g. the request to `GET /symbol.json`), the request that is selected in your screenshot is to the APM server. I should have made that clear in my initial comment.

The important thing with configuring `distributedTracingOrigins` is to set the origin that is used to create the http request. On the RUM agent before each http request is send we check whether the origin of that request exists on the `distributedTracingOrigins` list, if so we will add the `elastic-apm-traceparent` header. In your case it seems that the requests are made to the F5 IP, therefore that should be added to `distributedTracingOrigins`. You can find more details on [our distributed tracing guide](https://www.elastic.co/guide/en/apm/agent/js-base/current/distributed-tracing-guide.html)

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![oldcodeoberyn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oldcodeoberyn/32/24800_2.png) [@oldcodeoberyn](https://discuss.elastic.co/u/oldcodeoberyn)\
**Post date:** [January 31, 2019, 12:33am UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/6 "2019-01-31T00:33:03Z")

</div>

It is clear now, Thank you for the patient 😀

---

<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:** [February 20, 2019, 8:33pm UTC](https://discuss.elastic.co/t/rum-timeline-are-not-align-with-chrome-network-waterfall-and-rum-not-work-with-distributed-tracing/166070/7 "2019-02-20T20:33:06Z")

</div>

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