All Products
Search
Document Center

Application Real-Time Monitoring Service:Slow session tracing

Last Updated:Mar 11, 2026

When page loads take too long, you need to identify which specific resources -- scripts, stylesheets, images, or fonts -- are responsible. Slow session tracing in Application Real-Time Monitoring Service (ARMS) captures a waterfall chart of static resource loading during each page load, so you can trace slow loads back to individual resources and fix them.

ProblemHow slow session tracing helps
Slow page loadsBreaks the load into individual resource timings so you can spot the slowest ones
Intermittent performance spikesRanks the top 20 slowest sessions in a given time window for comparison
Unknown root causePairs a resource waterfall with client metadata (IP, browser, OS) to narrow the cause

Prerequisites

Before you begin, make sure that you have:

Enable static resource reporting in the SDK

By default, the ARMS Browser Monitoring SDK does not report static resource data. To enable slow session tracing, set sendResource to true in the SDK config object:

<script>
!(function(c,b,d,a){c[a]||(c[a]={});c[a].config={pid:"atc889zkcf@8cc3f6354******",imgUrl:"https://arms-retcode.aliyuncs.com/r.png?",sendResource:true};
with(b)with(body)with(insertBefore(createElement("script"),firstChild))setAttribute("crossorigin","",src=d)
})(window,document,"https://retcode.alicdn.com/retcode/bl.js","__bl");
</script>

Replace the pid value with your own application PID from the ARMS console.

After you redeploy the application, the SDK reports static resource timing data each time the page fires its onload event.

Data sampling thresholds

Enabling sendResource generates a large volume of telemetry. To limit overhead, ARMS samples data based on page load time:

Page load timeReporting behavior
> 8 sFull data reported
2 s -- 8 s5% of sessions sampled
< 2 sNo data reported
Important

If your application already loads under 2 seconds, enabling static resource reporting adds network overhead without providing data. Evaluate whether the tracing benefit justifies the cost before you enable it.

Trace a slow page load from the Page speed page

This walkthrough shows how to trace a slow page load back to specific resources. This is the recommended starting point when you notice a spike in page load time.

  1. In the ARMS console, choose Browser Monitoring > Browser Monitoring in the left-side navigation pane.

  2. On the Browser Monitoring page, select a region in the top navigation bar and click the application name.

  3. Choose Application > Page Speed.

  4. In the Page Load Time Details section, look for spikes in load time. In the following example, the full-page load time reaches 36.7 s at 11:00.

    Page Load Time Details section

  5. Scroll down to the Slow Page Session Trace (TOP20) section, which lists the 20 slowest sessions within the selected time window. To adjust the window, click the clock icon in the upper-right corner. In this example, one session reaches a load time of 36.72 s at 11:36:46 -- the direct cause of the spike.

    Slow Page Session Trace (TOP20) section

  6. In the Page column, click the page name to open the Slow Loading Details page.

  7. Review the waterfall chart in the Page Resource Loading Waterfall section. Each bar represents a single resource request with its timing breakdown. When analyzing the waterfall, look for:

    • Resources with load times disproportionately longer than others

    • Large resources (scripts, images) that block rendering

    • Third-party resources that introduce latency

    • Resources showing Size: 0 or Time: 0 (see Troubleshoot waterfall chart data)

    Page Resource Loading Waterfall section

  8. Check the Page Information section at the top of the Slow Loading Details page for client metadata -- IP address, browser, and operating system. Use this context to determine whether the bottleneck is network-related or resource-specific.

    Slow Loading Details page

Browse sessions from the Session traces page

As an alternative to starting from Page Speed, you can browse all recorded sessions directly.

  1. In the left-side navigation pane, choose Application > Session Traces.

  2. Filter sessions by username, user ID, session ID, IP address, page URL, browser, browser version, network connection type, or region.

    Session Traces page

  3. In the Session ID column, click a session ID to open the Session Details page. For details on interpreting session data, see Session tracing.

Troubleshoot waterfall chart data

Size shows 0 in the resource waterfall

The Size value comes from the PerformanceResourceTiming.transferSize browser API. It returns 0 in two cases:

  • The resource was served from the browser cache.

  • The resource is cross-origin and the server does not set a Timing-Allow-Origin header.

To verify, open Chrome DevTools (F12), go to the Network tab, and select Disable cache. Reload the page -- the transferSize values should appear.

Disable cache disabledtransferSize displayed after disabling cache

Time shows 0 in the resource waterfall

The Time value comes from PerformanceResourceTiming.duration. It returns 0 when the browser serves the resource from a long-lived cache controlled by the max-age directive, because no network request occurs.

To confirm, open Chrome DevTools (F12), go to the Network tab, select Disable cache, and refresh. The timing values should populate.

Cross-origin resources return 0 for all timing fields

Due to the same-origin policy, the browser returns 0 for the following timing attributes on cross-origin resources:

redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, responseStart

To fix this, add a Timing-Allow-Origin header to the cross-origin resource response:

Timing-Allow-Origin: *

This grants any origin access to the resource timing data. For more granular control, specify individual origins instead of *.

API waterfall chart time range

The API waterfall chart covers the period from page load start to one minute after the page is fully loaded. It shows the overall status of API requests made during page loading.

API response time differs between waterfall charts

The response time in the API waterfall chart is typically a few milliseconds longer than in the resource waterfall chart because the two charts measure timing differently:

ChartMeasurement method
API waterfall chartMeasures from when the request is sent to when data returns
Resource waterfall chartUses performance.getEntriesByType('resource'), which relies on browser-level resource timing

This difference is negligible and does not affect bottleneck analysis.

API waterfall chart timeline start point

The timeline origin in the API waterfall chart equals the difference between when the API sends a request and the page's fetchStart timestamp. This reveals when each API request fires relative to the page load lifecycle.

Related topics