# Identify unlabeled RUM activity in timeline

**URL:** <https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850>\
**Category:** APM\
**Tags:** rum\
**Created:** [June 4, 2020, 9:22pm UTC](https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850 "2020-06-04T21:22:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stitch-bb8](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@stitch-bb8](https://discuss.elastic.co/u/stitch-bb8)\
**Post date:** [June 4, 2020, 9:22pm UTC](https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850/1 "2020-06-04T21:22:23Z")

</div>

![rum timeline](https://us1.discourse-cdn.com/elastic/original/3X/8/5/85f37946b3102efa5b6d88f23c1afaad75a2cd29.png)  
**Kibana version** :

**Elasticsearch version** : 7.5.2

**APM Server version** : 7.5.2

**APM Agent language and version** : Java 1.15.0

**Browser version** : Cordova browser, but essentially Android 8.1.0 Chrome Mobile WebView

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: not sure

**Fresh install or upgraded from other version?** : fresh

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.\*\*:

For our Javascript (Angular) RUM , we are using our own transactions, like:  
`Globals.APM.startTransaction(name, type, {managed: true});`

And the Javascript/Angular RUM Agent is configured as:

```auto
            serviceName: 'twms-mobile',
            serverUrl: <our server URL>,
            environment: <our environment name>,
            disableInstrumentations: ['page-load', 'custom', 'user-interaction']
        });

```

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
Please see attached screenshot. As you can see we are correctly getting distributed transactions and spans for a lot of stuff. I need help identifying what is going on during the part I annotated with the red line and the orange line. I believe the orange line is mostly network, but I'm not seeing anything that details SSL negotiation and such. Is the blue bar for the "POST" span include or exclude opening connections?

---

<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:** [June 9, 2020, 12:28pm UTC](https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850/2 "2020-06-09T12:28:31Z")

</div>

Hi @stitch-bb8,

Thanks for reaching out.

The blue bar for POST measures the time from when the `XMLHttpRequest.send` is called until the request's ready state changes to `DONE`. The space that is indicated by the orange line could be processing/parsing that is done on the server side before the Java agent captures the transaction (e.g. a middleware).

Regarding the red line, it depends on the application. for example if you're using angular's http service then there might be some processing that happens in the framework. The best way to debug these would be to use `performance.mark` and `performance.measure` (or create custom spans) in places that could introduce this delay.

Let me know if you have any other questions.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![stitch-bb8](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@stitch-bb8](https://discuss.elastic.co/u/stitch-bb8)\
**Post date:** [June 10, 2020, 7:14pm UTC](https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850/3 "2020-06-10T19:14:24Z")

</div>

Thanks, Hamid.  
I'm still processing your response, but I am wondering if Breakdown Metrics might provide some of the answers I am looking for? Based upon the description at this URL, I think they would help me a lot because they seem to mirror some of what Chrome DevTool's "Timeline" view shows:

[https://www.elastic.co/guide/en/apm/agent/rum-js/current/breakdown-metrics-docs.html](https://www.elastic.co/guide/en/apm/agent/rum-js/current/breakdown-metrics-docs.html)

> **[Network Analysis Reference  |  Tools for Web Developers](https://developers.google.com/web/tools/chrome-devtools/network/reference?utm_source=devtools#timing)**
>
> A comprehensive reference of Chrome DevTools Network panel features.

Going on the assumption that the breakdown metrics would help, I've tried to enable them but I didn't have any luck. Are custom transactions allowed to use breakdown metrics as long as they are configured as "managed"? If so, any suggestions on what I might have missed?

I added `breakdownMetrics: true` to the init of the Angular APM Service and our custom transactions are started by `.startTransaction(name, type, {managed: true});` (just showing you that we have the `managed` option set to true.)

Edit: Here's an additional twist that might help. I disabled our custom transactions and I added

```auto
                breakdownMetrics: true,
                logLevel: 'trace',
                distributedTracingOrigins: ['http://localhost:4200', 'http://localhost:8080']

```

to the init for for the APM Service. See in this screenshot where the "click" transaction now shows a Longtask(self) between the initiating Transaction and the POST, but I was hoping to see the DNS, TCP, etc. metrics.

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c1b3ee0f1719b0b5af760cc7406e04bd26b43158.png)

---

<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:** [June 24, 2020, 8:35am UTC](https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850/4 "2020-06-24T08:35:13Z")

</div>

Hi @stitch-bb8,

Apologies for the delay.

> I added `breakdownMetrics: true` to the init of the Angular APM Service and our custom transactions are started by `.startTransaction(name, type, {managed: true});` (just showing you that we have the `managed` option set to true.)

Breakdown metrics for custom transactions would work when you set the `managed: true` based it would be based on the spans that are captured as part of transaction. so in the your above example of `F752657771+0001` transaction, it would be `app: x%` and `http: y%` so it wont help you with the network level information that you are interested in.

> See in this screenshot where the "click" transaction now shows a Longtask(self) between the initiating Transaction and the POST, but I was hoping to see the DNS, TCP, etc. metrics.

For transactions other than `page-load`, we cannot reliably calculate the DNS, TCP. etc metrics as click would have not triggered a network request and thats why we rely on calculating the breakdown based on span types as i stated above. But you have brought a good point on understanding the Network based metrics for the span and I have created an enhancement request to address it [support capturing breakdown for individual spans through config · Issue #823 · elastic/apm-agent-rum-js · GitHub](https://github.com/elastic/apm-agent-rum-js/issues/823).

For the time being, If you are interested in understanding the non annotated times would be through [UserTiming API](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) and the agent would capture them and create spans appropriately. The same would apply to the `Longtask` as well as the browser is busy doing some work which would block the main thread. Check this doc which has information on [interrupting long tasks](https://www.elastic.co/guide/en/apm/agent/rum-js/current/longtasks.html).

Let us if it helps.

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:** [July 15, 2020, 4:37am UTC](https://discuss.elastic.co/t/identify-unlabeled-rum-activity-in-timeline/235850/5 "2020-07-15T04:37:04Z")

</div>

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