Span duration missing resource loading time from Chrome devtools

Hi!

APM Agent language and version: Elastic APM RUM JavaScript agent, 5.12.0

Browser version: Chrome 114

In our project, we use custom transactions since the website is old and uses a lot of iframes, but the spans that 'fills' a custom transaction are just copied from what the agent records. I have noticed that the span.duration I can see in Kibana only includes the network transfer time from the Chrome devtools and not the resource loading time. I have included images below to better describe the issue.

Is this the standard behavior? I would like that the span matched the duration (in this case 89ms) so it also included the resource loading time. Maybe somewhere along the way, my options are wrong but I cannot find any resources that explains what that might be.

Please let me know if any information is missing - I am far from an expert. Thanks in advance.

Hi @Morten_Bjerre,

The RUM agent duration is actually producing the correct Duration time which only includes the time spent on downloading the resource time from the network.

Being the JS library running the browser, the Agent has access only to the API's browser provides and does not have access to all the Network level profiling data that Chrome devtools has access to. This includes profiling data from the Blink(layout engine) and V8(JavaScript Engine), hence the devtools is able to give more information when you profile a web page.

Network Transfer time - Includes the time spent on the network downloading the resource (RUM agent gets it from browser API).

Resource Loading Time - Time spent by the browser to process the downloaded resource. (Only available in Devtools or any Synthetic monitoring tools which runs profiler under the hood).

Hope this helps, Please let us know if you have any other questions.

Thanks,
Vignesh

1 Like

Hi @vigneshshanmugam,

Thank you for the reply! That makes sense :slight_smile:

Cheers,
Morten

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