Skip to content

[RUM-14619] Add setViewLoadingTime API documentation#35328

Open
MaelNamNam wants to merge 2 commits intomasterfrom
mael.lilensten/rum/add_set_view_loading_time_docs_for_browser
Open

[RUM-14619] Add setViewLoadingTime API documentation#35328
MaelNamNam wants to merge 2 commits intomasterfrom
mael.lilensten/rum/add_set_view_loading_time_docs_for_browser

Conversation

@MaelNamNam
Copy link
Contributor

@MaelNamNam MaelNamNam commented Mar 17, 2026

What does this PR do? What is the motivation?

Documents the new setViewLoadingTime() experimental API for the Browser RUM SDK. This API allows developers to manually set a view's loading time, overriding the automatic calculation based on network requests and DOM mutations.

The documentation is added to the "Monitoring Page Performance" page, as a new subsection under "How loading time is calculated", consistent with how the mobile SDKs document the equivalent addViewLoadingTime API.

Merge instructions

Merge readiness:

  • Ready for merge

Additional notes

The corresponding SDK change has already been shipped, see DataDog/browser-sdk#4180 released in v6.31.0. This PR adds the missing public documentation.

Document the new experimental API that allows manually setting
a view's loading time, overriding the automatic calculation.
@MaelNamNam MaelNamNam requested a review from a team as a code owner March 17, 2026 10:27
@github-actions
Copy link
Contributor

@MaelNamNam MaelNamNam requested a review from rtrieu March 17, 2026 10:38
@MaelNamNam MaelNamNam changed the title RUM Browser: Add setViewLoadingTime API documentation [RUM-14619] Add setViewLoadingTime API documentation Mar 17, 2026
@MaelNamNam MaelNamNam self-assigned this Mar 17, 2026
Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor feedback, but otherwise looks good


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our policy is that we don't document how the product/feature may work in the future, only as it does now

Suggested change
**Note**: This API is experimental and might change in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants