From 25c6ff034df5b85654a43e576cca835a857d9640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Lilensten?= Date: Tue, 17 Mar 2026 11:27:07 +0100 Subject: [PATCH 1/3] Add setViewLoadingTime API documentation for Browser SDK Document the new experimental API that allows manually setting a view's loading time, overriding the automatic calculation. --- .../browser/monitoring_page_performance.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md b/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md index 92d2ff1ad6d..e14be66a32f 100644 --- a/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md +++ b/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md @@ -109,6 +109,20 @@ To account for modern web applications, loading time watches for network request - **SPA Route Change**: Loading Time is equal to the difference between the URL change and the first time the page has no activity. Read [How page activity is calculated](#how-page-activity-is-calculated) for details. +### Manually set the loading time + +If the automatic loading time calculation does not accurately reflect when your view has finished loading, you can manually set it using `setViewLoadingTime`. Call this method when your view is fully loaded and displayed to the user. The loading time is computed as the elapsed time since the current view started. + +```javascript +window.DD_RUM.setViewLoadingTime() +``` + +Each call replaces any previously set value (last-call-wins). Once called, the automatic loading time detection is stopped and the manual value is used instead. + +After the loading time is sent, it is accessible as `@view.loading_time` and is visible in the RUM UI. + +**Note**: This API is experimental and might change in the future. + ### How page activity is calculated The RUM Browser SDK tracks the page activity to estimate the time until the interface is stable again. The page is considered to have activity when: From c55f2be07bfdcfbeb079a7925eead6e56436038a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Lilensten?= Date: Tue, 17 Mar 2026 11:42:02 +0100 Subject: [PATCH 2/3] Use 'After' instead of 'Once' per style guide --- .../browser/monitoring_page_performance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md b/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md index e14be66a32f..bab7ef90d01 100644 --- a/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md +++ b/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md @@ -117,7 +117,7 @@ If the automatic loading time calculation does not accurately reflect when your window.DD_RUM.setViewLoadingTime() ``` -Each call replaces any previously set value (last-call-wins). Once called, the automatic loading time detection is stopped and the manual value is used instead. +Each call replaces any previously set value (last-call-wins). After it is called, the automatic loading time detection is stopped and the manual value is used instead. After the loading time is sent, it is accessible as `@view.loading_time` and is visible in the RUM UI. From b550bb2624d9be3c2d0b3a44d556419e3eb34168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Lilensten?= Date: Tue, 17 Mar 2026 21:10:15 +0100 Subject: [PATCH 3/3] Update content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com> --- .../browser/monitoring_page_performance.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md b/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md index bab7ef90d01..467fbae7a5d 100644 --- a/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md +++ b/content/en/real_user_monitoring/application_monitoring/browser/monitoring_page_performance.md @@ -121,7 +121,6 @@ Each call replaces any previously set value (last-call-wins). After it is called After the loading time is sent, it is accessible as `@view.loading_time` and is visible in the RUM UI. -**Note**: This API is experimental and might change in the future. ### How page activity is calculated