Skip to content

RUM-12330: Handle multi SDK instance in profiling#3026

Merged
ambushwork merged 2 commits into
feature/perfetto-profilingfrom
yl/profiling/multi-sdk-instance
Nov 28, 2025
Merged

RUM-12330: Handle multi SDK instance in profiling#3026
ambushwork merged 2 commits into
feature/perfetto-profilingfrom
yl/profiling/multi-sdk-instance

Conversation

@ambushwork

Copy link
Copy Markdown
Member

What does this PR do?

This PR handles multi SDK instance in profiling by bringing following changes:

  • PerfettoProfiler hold a map of <InstanceName, ProfilerCallback> to make sure the result can be sent back to the correct instance.
  • ProfilingStorage save the name of the instance on which the profiling feature is enabled, and when profiler is started in content provider, the instance name can be used to indicate the profiling is launched by which feature.

Motivation

RUM-12330

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/multi-sdk-instance branch from 3758d42 to aa9a89d Compare November 25, 2025 15:21
@datadog-official

datadog-official Bot commented Nov 25, 2025

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 72.86%
Total Coverage: 71.37% (-0.01%)

View detailed report

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

@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch from aa9a89d to 49b402e Compare November 25, 2025 16:02
@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch from 49b402e to d51e87a Compare November 25, 2025 16:53
@codecov-commenter

codecov-commenter commented Nov 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.96774% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.22%. Comparing base (f8c30e2) to head (5e1f23d).

Files with missing lines Patch % Lines
...dog/android/profiling/internal/ProfilingFeature.kt 26.67% 10 Missing and 1 partial ⚠️
...og/android/profiling/DdProfilingContentProvider.kt 0.00% 4 Missing ⚠️
...in/java/com/datadog/android/profiling/Profiling.kt 0.00% 2 Missing ⚠️
...atadog/android/internal/data/PreferencesStorage.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           feature/perfetto-profiling    #3026      +/-   ##
==============================================================
+ Coverage                       71.19%   71.22%   +0.03%     
==============================================================
  Files                             874      874              
  Lines                           31814    31847      +33     
  Branches                         5326     5331       +5     
==============================================================
+ Hits                            22649    22681      +32     
+ Misses                           7654     7647       -7     
- Partials                         1511     1519       +8     
Files with missing lines Coverage Δ
.../android/internal/data/SharedPreferencesStorage.kt 100.00% <100.00%> (ø)
.../android/profiling/internal/ProfilingDataWriter.kt 87.72% <100.00%> (-1.75%) ⬇️
...dog/android/profiling/internal/ProfilingStorage.kt 100.00% <100.00%> (ø)
...id/profiling/internal/perfetto/PerfettoProfiler.kt 93.94% <100.00%> (+2.00%) ⬆️
...atadog/android/internal/data/PreferencesStorage.kt 0.00% <0.00%> (ø)
...in/java/com/datadog/android/profiling/Profiling.kt 0.00% <0.00%> (ø)
...og/android/profiling/DdProfilingContentProvider.kt 0.00% <0.00%> (ø)
...dog/android/profiling/internal/ProfilingFeature.kt 69.05% <26.67%> (-10.95%) ⬇️

... and 40 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 marked this pull request as ready for review November 25, 2025 17:52
@ambushwork
ambushwork requested review from a team as code owners November 25, 2025 17:52
@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch 4 times, most recently from 5610c4e to 969e653 Compare November 26, 2025 15:14
@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch 2 times, most recently from 6a0d497 to c0b2791 Compare November 26, 2025 16:46
@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch from c0b2791 to 9634ba2 Compare November 26, 2025 17:03
@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch 2 times, most recently from 0fd6706 to 6564e3f Compare November 27, 2025 11:36
@ambushwork
ambushwork force-pushed the yl/profiling/multi-sdk-instance branch from 6564e3f to 5e1f23d Compare November 27, 2025 11:58
@ambushwork
ambushwork requested a review from 0xnm November 27, 2025 15:07
@ambushwork
ambushwork merged commit 32e1a44 into feature/perfetto-profiling Nov 28, 2025
26 of 27 checks passed
@ambushwork
ambushwork deleted the yl/profiling/multi-sdk-instance branch November 28, 2025 13:54
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