Skip to content

Set profiling sampling rate to 15%, improve profiling logic#3127

Merged
0xnm merged 1 commit into
feature/perfetto-profilingfrom
nogorodnikov/improve-profiling-logic-150126
Jan 16, 2026
Merged

Set profiling sampling rate to 15%, improve profiling logic#3127
0xnm merged 1 commit into
feature/perfetto-profilingfrom
nogorodnikov/improve-profiling-logic-150126

Conversation

@0xnm

@0xnm 0xnm commented Jan 15, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This change set default profiling sampling rate to 15% and also does a bit of refactoring.

Additionally it stops profiler even if it RUM session is not sampled, to avoid having profiler running for nothing.

Also profiler_version and runtime_version tags are added to have more visibility in profiling backend metrics.

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)

@datadog-official

datadog-official Bot commented Jan 15, 2026

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 70.73%
Overall Coverage: 65.93% (+0.00%)

View detailed report

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

@0xnm
0xnm force-pushed the nogorodnikov/improve-profiling-logic-150126 branch from a42845b to e2ff1e1 Compare January 15, 2026 14:42
@0xnm
0xnm marked this pull request as ready for review January 15, 2026 15:19
@0xnm
0xnm requested a review from a team as a code owner January 15, 2026 15:19
@codecov-commenter

codecov-commenter commented Jan 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.17073% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.78%. Comparing base (4b65d7d) to head (ecce151).
⚠️ Report is 203 commits behind head on feature/perfetto-profiling.

Files with missing lines Patch % Lines
...dog/android/profiling/internal/ProfilingFeature.kt 58.33% 4 Missing and 1 partial ⚠️
...og/android/internal/profiling/ProfilerStopEvent.kt 0.00% 4 Missing ⚠️
...id/profiling/internal/perfetto/PerfettoProfiler.kt 0.00% 0 Missing and 1 partial ⚠️
...droid/rum/internal/domain/scope/RumSessionScope.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           feature/perfetto-profiling    #3127      +/-   ##
==============================================================
- Coverage                       71.52%   70.78%   -0.75%     
==============================================================
  Files                             894      906      +12     
  Lines                           32838    33359     +521     
  Branches                         5516     5590      +74     
==============================================================
+ Hits                            23486    23610     +124     
- Misses                           7800     8177     +377     
- Partials                         1552     1572      +20     
Files with missing lines Coverage Δ
...in/java/com/datadog/android/profiling/Profiling.kt 81.82% <ø> (+25.57%) ⬆️
...atadog/android/profiling/ProfilingConfiguration.kt 100.00% <100.00%> (ø)
.../android/profiling/internal/ProfilingDataWriter.kt 86.89% <100.00%> (-6.10%) ⬇️
...roid/profiling/internal/perfetto/PerfettoResult.kt 100.00% <100.00%> (ø)
.../internal/startup/RumSessionScopeStartupManager.kt 96.58% <100.00%> (+6.84%) ⬆️
...id/profiling/internal/perfetto/PerfettoProfiler.kt 92.06% <0.00%> (-3.10%) ⬇️
...droid/rum/internal/domain/scope/RumSessionScope.kt 91.61% <50.00%> (+0.17%) ⬆️
...og/android/internal/profiling/ProfilerStopEvent.kt 0.00% <0.00%> (ø)
...dog/android/profiling/internal/ProfilingFeature.kt 66.04% <58.33%> (+3.54%) ⬆️

... and 44 files with indirect coverage changes

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

@0xnm
0xnm force-pushed the nogorodnikov/improve-profiling-logic-150126 branch from e2ff1e1 to ecce151 Compare January 15, 2026 16:41
@0xnm
0xnm merged commit 0d7396f into feature/perfetto-profiling Jan 16, 2026
26 checks passed
@0xnm
0xnm deleted the nogorodnikov/improve-profiling-logic-150126 branch January 16, 2026 12:09
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