Skip to content

[RUM 16664] Report TTID and TTFD on RN apps - #1336

Open
sbarrio wants to merge 6 commits into
developfrom
sbarrio/RUM-16664/add-report-app-fully-displayed-api-for-ttfd
Open

sbarrio wants to merge 6 commits into
developfrom
sbarrio/RUM-16664/add-report-app-fully-displayed-api-for-ttfd

Conversation

@sbarrio

@sbarrio sbarrio commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

TTID reporting

This PR integrates the com.datadoghq:dd-sdk-android-rum-prelaunch module that was added to the Android SDK here: DataDog/dd-sdk-android#3635

As such, this PR also bumps the native Android SDK to version 3.15.0.

This module integrates a way for Cross Platform SDKs to reliably obtain a TTID measurement without having to rely on the native Android SDK being initialized as early as possible, which is something that on most RN apps will not be possible as the first Activity will most probably have rendered its first frame way before the RN bridge has started and the host app has initialized the RN SDK. For more details on the implementation please check the PR linked above.

TTFD reporting

Second, this PR exposes the manual reportAppFullyDisplayed API, which allows for host apps to decide when an app has completed it's first display and report that timestamp back to Datadog to be presented on the Dashboard as the TTFD value for that session alongside its TTID.

Motivation

TTID and TTFD vitals have been reported consistently on native SDKs for a while now but the RN SDK lacked propert support for them. This PR solves this.

Additional Notes

Android

Screenshot 2026-07-09 at 16 21 09 Screenshot 2026-07-09 at 16 20 05

iOS

Screenshot 2026-07-09 at 16 20 54 Screenshot 2026-07-09 at 16 21 02

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

Comment thread packages/core/android/build.gradle Outdated
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e424cd4 | Docs | View more details | Give us feedback!

@sbarrio
sbarrio force-pushed the sbarrio/RUM-16664/add-report-app-fully-displayed-api-for-ttfd branch from 9ffcb33 to 92df9ba Compare July 31, 2026 10:53
@sbarrio sbarrio added the Do not merge This PR is not ready to be merged yet label Jul 31, 2026
@sbarrio
sbarrio force-pushed the sbarrio/RUM-16664/add-report-app-fully-displayed-api-for-ttfd branch from 92df9ba to 231a438 Compare September 1, 2026 15:27
@sbarrio
sbarrio force-pushed the sbarrio/RUM-16664/add-report-app-fully-displayed-api-for-ttfd branch from 231a438 to 7eba10b Compare September 24, 2026 11:02
@sbarrio sbarrio removed the Do not merge This PR is not ready to be merged yet label Oct 9, 2026
@sbarrio
sbarrio force-pushed the sbarrio/RUM-16664/add-report-app-fully-displayed-api-for-ttfd branch from 7eba10b to e424cd4 Compare October 9, 2026 12:10
@sbarrio
sbarrio marked this pull request as ready for review October 9, 2026 12:24
@sbarrio
sbarrio requested a review from a team as a code owner October 9, 2026 12:24
Copilot AI balanced review requested due to automatic review settings October 9, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cross-platform startup instrumentation and native bridge changes require final device and build validation.

0 open findings

What changed in this PR

Adds Android TTID collection and exposes manual TTFD reporting across React Native architectures.

Changes:

  • Upgrades Android Datadog dependencies and adds RUM prelaunch.
  • Adds reportAppFullyDisplayed() with native bridges and tests.
  • Updates example apps and iOS generated project metadata.
File Description
packages/​react-native-webview/​android/​build.gradle Upgrades WebView SDK.
packages/​react-native-session-replay/​android/​build.gradle Upgrades replay SDK and removes mavenLocal.
packages/​internal-testing-tools/​android/​build.gradle Upgrades core SDK.
packages/​core/​src/​specs/​NativeDdRum.ts Extends the native specification.
packages/​core/​src/​rum/​types.ts Exposes the public TTFD API.
packages/​core/​src/​rum/​DdRum.ts Implements buffered TTFD reporting.
packages/​core/​src/​rum/​__tests__/​DdRum.test.ts Tests JavaScript delegation.
packages/​core/​jest/​mock.js Updates the package mock.
packages/​core/​ios/​Tests/​MockRUMMonitor.swift Records TTFD calls in tests.
packages/​core/​ios/​Tests/​DdRumTests.swift Tests iOS delegation.
packages/​core/​ios/​Sources/​DdRumImplementation.swift Calls the iOS RUM monitor.
packages/​core/​ios/​Sources/​DdRum.mm Exports the iOS bridge method.
packages/​core/​android/​src/​test/​kotlin/​com/​datadog/​tools/​unit/​MockRumMonitor.kt Updates the Android monitor mock.
packages/​core/​android/​src/​test/​kotlin/​com/​datadog/​reactnative/​DdRumTest.kt Tests Android delegation.
packages/​core/​android/​src/​oldarchCommon/​kotlin/​com/​datadog/​reactnative/​DdRum.kt Exposes the old-architecture method.
packages/​core/​android/​src/​newarch/​kotlin/​com/​datadog/​reactnative/​DdRum.kt Exposes the new-architecture method.
packages/​core/​android/​src/​main/​kotlin/​com/​datadog/​reactnative/​DdRumImplementation.kt Calls the Android RUM monitor.
packages/​core/​android/​build.gradle Upgrades SDKs and adds RUM prelaunch.
packages/​core/​__mocks__/​react-native.ts Updates the typed React Native mock.
example/​src/​ddUtils.tsx Demonstrates TTFD with legacy initialization.
example/​src/​App.tsx Demonstrates TTFD with the provider.
example/​ios/​Podfile.lock Updates the RCT-Folly checksum.
example/​ios/​DdSdkReactNativeExample.xcodeproj/​project.pbxproj Adds Swift library search paths.
example-new-architecture/​ios/​Podfile.lock Updates the RCT-Folly checksum.
example-new-architecture/​ios/​DdSdkReactNativeExample.xcodeproj/​project.pbxproj Adds Swift library search paths.
example-new-architecture/​App.tsx Demonstrates TTFD reporting.
benchmarks/​ios/​Podfile.lock Updates the RCT-Folly checksum.
benchmarks/​ios/​BenchmarkRunner.xcodeproj/​project.pbxproj Adds Swift library search paths.
benchmarks/​android/​app/​build.gradle Upgrades benchmark SDK dependencies.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

3 participants