Skip to content

Conversation

@ambushwork
Copy link
Member

@ambushwork ambushwork commented Nov 19, 2025

What does this PR do?

This PR attaches following RUM context information in Profiling event so that it can be shown as tags in profiling page:

  • session id
  • vital id
  • view name
  • view id
    Also it changes the timing of RUM feature send TTID event to Profiling feature in order to stop the recording, so that the profiling event can attach the real first view event instead of artificial "AppLaunch" view event.

Motivation

RUM-12923

Demo

image

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)

@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch 6 times, most recently from 3f944ee to 40ef8eb Compare November 20, 2025 09:51
@ambushwork
Copy link
Member Author

application id + view id

@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch from 40ef8eb to 915ca04 Compare November 20, 2025 16:36
@ambushwork ambushwork changed the title RUM-12923: Apppend RUM session id and vital id in profiling event RUM-12923: Attach RUM information on profiling event Nov 20, 2025
@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch 3 times, most recently from e0a7ca3 to 965c1b2 Compare November 21, 2025 08:11
@datadog-official
Copy link

datadog-official bot commented Nov 21, 2025

🎯 Code Coverage
Patch Coverage: 68.52%
Total Coverage: 71.38% (-0.03%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 729c7ff | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@ambushwork ambushwork marked this pull request as ready for review November 21, 2025 08:40
@ambushwork ambushwork requested review from a team as code owners November 21, 2025 08:40
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 60.78431% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.21%. Comparing base (3d91afb) to head (965c1b2).
⚠️ Report is 6 commits behind head on feature/perfetto-profiling.

Files with missing lines Patch % Lines
.../internal/startup/RumSessionScopeStartupManager.kt 30.00% 6 Missing and 1 partial ⚠️
...src/main/java/com/datadog/android/rum/TTIDEvent.kt 0.00% 6 Missing ⚠️
.../android/profiling/internal/ProfilingDataWriter.kt 80.00% 0 Missing and 4 partials ⚠️
...dog/android/profiling/internal/ProfilingFeature.kt 70.00% 3 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           feature/perfetto-profiling    #3017      +/-   ##
==============================================================
- Coverage                       71.25%   71.21%   -0.04%     
==============================================================
  Files                             874      875       +1     
  Lines                           31768    31810      +42     
  Branches                         5321     5326       +5     
==============================================================
+ Hits                            22636    22653      +17     
- Misses                           7626     7644      +18     
- Partials                         1506     1513       +7     
Files with missing lines Coverage Δ
...dog/android/profiling/internal/ProfilingContext.kt 100.00% <100.00%> (ø)
...lin/com/datadog/android/rum/internal/RumFeature.kt 89.42% <ø> (+0.19%) ⬆️
...ernal/domain/scope/RumVitalAppLaunchEventHelper.kt 88.42% <100.00%> (ø)
...dog/android/profiling/internal/ProfilingFeature.kt 84.62% <70.00%> (-2.05%) ⬇️
.../android/profiling/internal/ProfilingDataWriter.kt 91.07% <80.00%> (-6.43%) ⬇️
...src/main/java/com/datadog/android/rum/TTIDEvent.kt 0.00% <0.00%> (ø)
.../internal/startup/RumSessionScopeStartupManager.kt 87.78% <30.00%> (-7.22%) ⬇️

... and 41 files with indirect coverage changes

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

@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch from 965c1b2 to 01719ec Compare November 21, 2025 09:54
@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch 2 times, most recently from 4c1b0ec to 58d9a31 Compare November 21, 2025 10:05
0xnm
0xnm previously approved these changes Nov 21, 2025
override fun write(
profilingResult: PerfettoResult
profilingResult: PerfettoResult,
ttidEvent: TTIDEvent?
Copy link
Member

Choose a reason for hiding this comment

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

For now, if we don't have TTIDEvent, we shouldn't even write profile and upload it.

I guess the goal is to have only profiles with RUM context associated.

Copy link
Member Author

Choose a reason for hiding this comment

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

in previous dogfooding, all the profiles > 1min are probably the profiles without correct TTID signal, if we stop sending them, we won't be able to see these kinds of abnormal profiles in next dogfooding.

Copy link
Member

Choose a reason for hiding this comment

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

all the profiles > 1min are probably the profiles without correct TTID signal

I don't think it is a problem of TTID signal, but rather a problem of Perfetto callback result delayed.

But we can keep it if you suggest it is valuable to have such, we just need to remove that before the GA.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes I agree, my point is that we need to keep it for exposing the perfetto callback issue

@ambushwork ambushwork dismissed stale reviews from 0xnm and aleksandr-gringauz via beec57e November 21, 2025 10:32
@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch from 58d9a31 to beec57e Compare November 21, 2025 10:32
@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch from beec57e to 2af8c71 Compare November 21, 2025 10:38
@ambushwork ambushwork force-pushed the yl/profiling/send-vital-events branch from 2af8c71 to 729c7ff Compare November 21, 2025 10:51
@ambushwork
Copy link
Member Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 21, 2025

View all feedbacks in Devflow UI.

2025-11-21 11:26:45 UTC ℹ️ Start processing command /merge


2025-11-21 11:26:51 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-11-21 11:39:19 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in feature/perfetto-profiling is approximately 0s (p90).


2025-11-21 11:43:29 UTC ℹ️ MergeQueue: This merge request was already merged

This pull request was merged directly.

@ambushwork ambushwork merged commit ab1e3f9 into feature/perfetto-profiling Nov 21, 2025
27 checks passed
@ambushwork ambushwork deleted the yl/profiling/send-vital-events branch November 21, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants