Skip to content

RUM-11968: Implement Profiling Feature#2918

Merged
ambushwork merged 1 commit into
feature/perfetto-profilingfrom
yl/profiling/create-feature
Oct 8, 2025
Merged

RUM-11968: Implement Profiling Feature#2918
ambushwork merged 1 commit into
feature/perfetto-profilingfrom
yl/profiling/create-feature

Conversation

@ambushwork

@ambushwork ambushwork commented Oct 7, 2025

Copy link
Copy Markdown
Member

What does this PR do?

  • Implement ProfilingFeature
  • Add enable API in Profiling object
  • Add ProfilingConfiguration

Motivation

RUM-11968

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/create-feature branch from b02476a to 1c50c7f Compare October 7, 2025 09:54
@codecov-commenter

codecov-commenter commented Oct 7, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.68421% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.78%. Comparing base (2e8bbfc) to head (eed2352).
⚠️ Report is 989 commits behind head on feature/perfetto-profiling.

Files with missing lines Patch % Lines
...in/java/com/datadog/android/profiling/Profiling.kt 0.00% 7 Missing ⚠️
...dog/android/profiling/internal/ProfilingFeature.kt 86.96% 3 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           feature/perfetto-profiling    #2918      +/-   ##
==============================================================
- Coverage                       70.79%   70.78%   -0.01%     
==============================================================
  Files                             821      823       +2     
  Lines                           30152    30189      +37     
  Branches                         5143     5143              
==============================================================
+ Hits                            21344    21367      +23     
- Misses                           7349     7362      +13     
- Partials                         1459     1460       +1     
Files with missing lines Coverage Δ
...atadog/android/profiling/ProfilingConfiguration.kt 100.00% <100.00%> (ø)
...dog/android/profiling/internal/ProfilingFeature.kt 86.96% <86.96%> (ø)
...in/java/com/datadog/android/profiling/Profiling.kt 0.00% <0.00%> (ø)

... and 37 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 October 7, 2025 10:05
@ambushwork
ambushwork requested review from a team as code owners October 7, 2025 10:05
* will be used.
*/
@JvmStatic
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do you think we should simply set minSdk to that for this module?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think so, it will force clients to upgrade their application's minSdk for using profiling feature. But actually we expect that anyone can import profiling feature, and they are able to enable it only for end user's device above SDK 35

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.

Good question.

If you try (change minSdk of a module to 30 and compile the sample), you have something like this:

Manifest merger failed : uses-sdk:minSdkVersion 23 cannot be smaller than version 30 declared in library [:integrations:dd-sdk-android-sqldelight] /Users/aleksandr.gringauz/projects/dd-sdk-android/integrations/dd-sdk-android-sqldelight/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml as the library might be using APIs not available in 23
	Suggestion: use a compatible library with a minSdk of at most 23,
		or increase this project's minSdk version to at least 30,
		or use tools:overrideLibrary="com.datadog.android.sqldelight" to force usage (may lead to runtime failures)

I'm almost sure it will be the same for the library when it isn't compiled, but downloaded. Because it is manifest merging.

The customer will have to use flavors (like this) to use the profiling module.

But the question is - how to deal with these flavors when uploading to google play. I currently don't know, research needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is important point indeed, thanks for bringing it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's add TODO item for now.

@ambushwork ambushwork Oct 8, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What's the thing to do here? do we want to bump the minSdk for this?

@ambushwork
ambushwork force-pushed the yl/profiling/create-feature branch from 1c50c7f to 03cee8e Compare October 7, 2025 11:11
@ambushwork
ambushwork force-pushed the yl/profiling/create-feature branch 3 times, most recently from 897b5fd to a67463c Compare October 7, 2025 13:12
@ambushwork
ambushwork force-pushed the yl/profiling/create-feature branch from a67463c to eed2352 Compare October 7, 2025 13:43
@ambushwork
ambushwork merged commit 5227969 into feature/perfetto-profiling Oct 8, 2025
25 checks passed
@ambushwork
ambushwork deleted the yl/profiling/create-feature branch October 8, 2025 13:03
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