Skip to content

RUM-11785: Introduce telemetry for TTID#2910

Merged
aleksandr-gringauz merged 2 commits into
aleksandr-gringauz/feature/app-launch-prsfrom
aleksandr-gringauz/RUM-11785/TTID-telemetry-2
Oct 7, 2025
Merged

RUM-11785: Introduce telemetry for TTID#2910
aleksandr-gringauz merged 2 commits into
aleksandr-gringauz/feature/app-launch-prsfrom
aleksandr-gringauz/RUM-11785/TTID-telemetry-2

Conversation

@aleksandr-gringauz

@aleksandr-gringauz aleksandr-gringauz commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

This pr connects together RumAppStartupDetector, RumTTIDReporter and reports TTID value using telemetry along with some additional information. You can read the spec of the telemetry here.

Reporting the values to RUM intake using Vitals will be done in future PRs, because currently there are some frontend problems that prevent them from being displayed properly.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • 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)

@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-11785/TTID-telemetry-2 branch 2 times, most recently from 4a28844 to 35b10f0 Compare October 2, 2025 11:29
when (event) {
is RumRawEvent.AppStartTTIDEvent -> {
if (sessionState == State.TRACKED) {
rumAppStartupTelemetryReporter.reportTTID(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I expect that reporting the actual value to the RUM intake using Vitals will take place exactly next to this reportTTID call in RumSessionScope.

The new vital doesn't require a view, so no need to put this in RumViewScope.

It will be in the future PRs.

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.

I am not 100% sure about this, but as far as I know we bound every event to a view. I mean it's impossible to report an event without being bound to a view. Probably you should use background view or so? cc @0xnm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We plan to actually not require view for TTID. Simao created a special type of vital for TTID and TTFD and made it so that it doesn't require view. However for now there is some frontend work that needs to be done so that this could be displayed properly.

DataDog/rum-events-format#302
DataDog/rum-events-format#306

That's why I said in the description that the code for sending the vitals will be in the future PRs. This PR only contains telemetry.

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.

I am not argue with that, but as TTID stands fro time to initial display maybe view still required to tell to the user which exact view is responsible for the initial display?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not argue with that, but as TTID stands fro time to initial display maybe view still required to tell to the user which exact view is responsible for the initial display?

Currently we plan not to send the viewId with TTID vital. However the frontend implementation for this isn't ready and there is indeed a chance that we might encounter some unexpected problems and have to actually send the viewId. If so, ok - we will change our implementation.

We plan to show the TTID value only in session level UI, not on View level.

@aleksandr-gringauz
aleksandr-gringauz marked this pull request as ready for review October 2, 2025 11:31
@aleksandr-gringauz
aleksandr-gringauz requested review from a team as code owners October 2, 2025 11:31
@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-11785/TTID-telemetry-2 branch 2 times, most recently from efa786f to e5e9b38 Compare October 2, 2025 11:57
when (event) {
is RumRawEvent.AppStartTTIDEvent -> {
if (sessionState == State.TRACKED) {
rumAppStartupTelemetryReporter.reportTTID(

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.

I am not 100% sure about this, but as far as I know we bound every event to a view. I mean it's impossible to report an event without being bound to a view. Probably you should use background view or so? cc @0xnm

@codecov-commenter

codecov-commenter commented Oct 2, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.14%. Comparing base (4581a67) to head (272579b).

Files with missing lines Patch % Lines
...lin/com/datadog/android/rum/internal/RumFeature.kt 69.23% 3 Missing and 1 partial ⚠️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 40.00% 3 Missing ⚠️
...droid/rum/internal/domain/scope/RumSessionScope.kt 85.71% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                              Coverage Diff                              @@
##           aleksandr-gringauz/feature/app-launch-prs    #2910      +/-   ##
=============================================================================
+ Coverage                                      71.10%   71.14%   +0.04%     
=============================================================================
  Files                                            819      822       +3     
  Lines                                          30058    30134      +76     
  Branches                                        5024     5036      +12     
=============================================================================
+ Hits                                           21370    21437      +67     
  Misses                                          7300     7300              
- Partials                                        1388     1397       +9     
Files with missing lines Coverage Δ
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 89.06% <100.00%> (+0.17%) ⬆️
...d/rum/internal/domain/scope/RumApplicationScope.kt 95.12% <100.00%> (+0.12%) ⬆️
...g/android/rum/internal/domain/scope/RumRawEvent.kt 100.00% <100.00%> (ø)
...roid/rum/internal/startup/RumAppStartupDetector.kt 100.00% <100.00%> (+100.00%) ⬆️
.../rum/internal/startup/RumAppStartupDetectorImpl.kt 95.74% <100.00%> (+2.41%) ⬆️
...internal/startup/RumAppStartupTelemetryReporter.kt 100.00% <100.00%> (ø)
...rnal/startup/RumAppStartupTelemetryReporterImpl.kt 100.00% <100.00%> (ø)
...android/rum/internal/startup/RumStartupScenario.kt 100.00% <100.00%> (ø)
...atadog/android/rum/internal/startup/RumTTIDInfo.kt 100.00% <100.00%> (ø)
...og/android/rum/internal/startup/RumTTIDReporter.kt 100.00% <100.00%> (+100.00%) ⬆️
... and 4 more

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-11785/TTID-telemetry-2 branch from e5e9b38 to b6b5c16 Compare October 2, 2025 13:56
@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-11785/TTID-telemetry-2 branch 2 times, most recently from d6f4c05 to db229b3 Compare October 6, 2025 08:51
@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-11785/TTID-telemetry-2 branch from db229b3 to 3f3bddd Compare October 6, 2025 11:38
@aleksandr-gringauz
aleksandr-gringauz merged commit 5ad840f into aleksandr-gringauz/feature/app-launch-prs Oct 7, 2025
24 of 25 checks passed
@aleksandr-gringauz
aleksandr-gringauz deleted the aleksandr-gringauz/RUM-11785/TTID-telemetry-2 branch October 7, 2025 10:43
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.

4 participants