Skip to content

RUM-15189: Add setContinuousSampleRate API to ProfilingConfiguration#3276

Merged
ambushwork merged 1 commit intofeature/continuous-profilingfrom
yl/profiling/RUM-15189-continuous-sample-rate-api
Mar 20, 2026
Merged

RUM-15189: Add setContinuousSampleRate API to ProfilingConfiguration#3276
ambushwork merged 1 commit intofeature/continuous-profilingfrom
yl/profiling/RUM-15189-continuous-sample-rate-api

Conversation

@ambushwork
Copy link
Copy Markdown
Member

What does this PR do?

This PRs implements setContinuousSampleRate API in ProfilingConfiguration, during the initialization of ProfilingFeature, this sample rate will be persist for next app launch profiling to decide if it needs to extends.

The continuous profiling sample rate persisting follows the same rules of app launch profiling, if multiple SDK instances enable profiling feature, the smallest sample rate is persisted.

Motivation

RUM-15189

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/RUM-15189-continuous-sample-rate-api branch from f9b1bde to 737fb9b Compare March 19, 2026 15:06
@ambushwork
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 737fb9b0e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ambushwork ambushwork force-pushed the yl/profiling/RUM-15189-continuous-sample-rate-api branch from 737fb9b to b19db6b Compare March 19, 2026 15:21
@ambushwork ambushwork marked this pull request as ready for review March 19, 2026 15:26
@ambushwork ambushwork requested review from a team as code owners March 19, 2026 15:26
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b19db6b0a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-prod-us1-4

This comment has been minimized.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.44%. Comparing base (61409f2) to head (d0c0841).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           feature/continuous-profiling    #3276      +/-   ##
================================================================
- Coverage                         71.68%   71.44%   -0.24%     
================================================================
  Files                               942      942              
  Lines                             34811    34829      +18     
  Branches                           5899     5901       +2     
================================================================
- Hits                              24954    24883      -71     
- Misses                             8233     8288      +55     
- Partials                           1624     1658      +34     
Files with missing lines Coverage Δ
...atadog/android/profiling/ProfilingConfiguration.kt 100.00% <100.00%> (ø)
...dog/android/profiling/internal/ProfilingFeature.kt 66.04% <100.00%> (ø)

... and 33 files with indirect coverage changes

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

kikoveiga
kikoveiga previously approved these changes Mar 19, 2026
whenever(
mockSharedPreferencesStorage
.getFloat(ProfilingStorage.KEY_CONTINUOUS_PROFILING_SAMPLE_RATE, -1f)
) doReturn fakeConfiguration.continuousSampleRate - 1f
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 test will be flaky if fakeConfiguration.continuousSampleRate is 0.

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.

test removed

@ambushwork ambushwork force-pushed the yl/profiling/RUM-15189-continuous-sample-rate-api branch 2 times, most recently from 34422b2 to 2e24822 Compare March 20, 2026 10:54
@ambushwork ambushwork force-pushed the yl/profiling/RUM-15189-continuous-sample-rate-api branch from 2e24822 to d0c0841 Compare March 20, 2026 10:55
@ambushwork ambushwork merged commit af1a3ee into feature/continuous-profiling Mar 20, 2026
26 checks passed
@ambushwork ambushwork deleted the yl/profiling/RUM-15189-continuous-sample-rate-api branch March 20, 2026 12:25
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