Skip to content

PANA-5681: Add heatmaps feature flag#3500

Open
jonathanmos wants to merge 1 commit into
gonzalezreal/PANA-5681/session-replay-heatmapsfrom
jmoskovich/pana-5681/heatmaps-ff
Open

PANA-5681: Add heatmaps feature flag#3500
jonathanmos wants to merge 1 commit into
gonzalezreal/PANA-5681/session-replay-heatmapsfrom
jmoskovich/pana-5681/heatmaps-ff

Conversation

@jonathanmos
Copy link
Copy Markdown
Member

@jonathanmos jonathanmos commented Jun 3, 2026

What does this PR do?

Adds a flag to enable the heatmaps feature (disabled by default) - setHeatmapsEnabled

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

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)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.16%. Comparing base (03802d0) to head (19c81c3).

Files with missing lines Patch % Lines
...nreplay/internal/recorder/SessionReplayRecorder.kt 33.33% 1 Missing and 1 partial ⚠️
.../sessionreplay/internal/DefaultRecorderProvider.kt 66.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                               Coverage Diff                               @@
##           gonzalezreal/PANA-5681/session-replay-heatmaps    #3500   +/-   ##
===============================================================================
  Coverage                                           72.16%   72.16%           
===============================================================================
  Files                                                 970      970           
  Lines                                               35656    35660    +4     
  Branches                                             5936     5936           
===============================================================================
+ Hits                                                25730    25734    +4     
+ Misses                                               8300     8298    -2     
- Partials                                             1626     1628    +2     
Files with missing lines Coverage Δ
...com/datadog/android/sessionreplay/SessionReplay.kt 73.33% <100.00%> (+0.61%) ⬆️
...ndroid/sessionreplay/SessionReplayConfiguration.kt 96.74% <100.00%> (-0.04%) ⬇️
...oid/sessionreplay/internal/SessionReplayFeature.kt 98.28% <100.00%> (+0.01%) ⬆️
.../sessionreplay/internal/DefaultRecorderProvider.kt 93.71% <66.67%> (-0.66%) ⬇️
...nreplay/internal/recorder/SessionReplayRecorder.kt 89.66% <33.33%> (-4.75%) ⬇️

... and 36 files with indirect coverage changes

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

@jonathanmos jonathanmos force-pushed the gonzalezreal/PANA-5681/session-replay-heatmaps branch 3 times, most recently from 11ba9b6 to 2df9570 Compare June 4, 2026 08:35
@jonathanmos jonathanmos force-pushed the jmoskovich/pana-5681/heatmaps-ff branch from 5161576 to 19c81c3 Compare June 4, 2026 11:30
@jonathanmos jonathanmos marked this pull request as ready for review June 4, 2026 12:47
@jonathanmos jonathanmos requested review from a team as code owners June 4, 2026 12:47
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: 19c81c3bed

ℹ️ 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".

internal val systemRequirementsConfiguration: SystemRequirementsConfiguration,
internal val internalCallback: SessionReplayInternalCallback
internal val internalCallback: SessionReplayInternalCallback,
internal val heatmapsEnabled: Boolean
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid changing the public data-class copy ABI

Adding this constructor property to the public data class changes the generated public copy/copy$default method descriptors (visible in the updated API dump). Any already-compiled Kotlin/Java code that calls SessionReplayConfiguration.copy(...) against the previous SDK can hit NoSuchMethodError after upgrading the runtime artifact without recompiling; keep the flag out of the data-class primary constructor or otherwise preserve the old copy ABI.

Useful? React with 👍 / 👎.

@datadog-prod-us1-5

This comment has been minimized.

sdkCore = sdkCore,
dynamicOptimizationEnabled = dynamicOptimizationEnabled,
rumContextProvider = rumContextProvider
rumContextProvider = if (heatmapIdentifierRegistry != null) {
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.

Why rumContextProvider is being controlled by heatmapIdentifierRegistry. Looks not such clear, is there any mistake? Seems like heatmapsEnabled is false by default which means it's gonna lead to API change?

* stable identifiers that correlate with RUM action events, powering the heatmap feature.
* Disabled by default.
*/
fun setHeatmapsEnabled(heatmapsEnabled: Boolean): Builder {
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.

worth to mark it as experimental API ?

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