Skip to content

PANA-5681: Integrate HeatmapIdentifierRegistry into RUM for heatmaps [3 of 4]#3205

Merged
jonathanmos merged 5 commits into
feature/heatmapsfrom
gonzalezreal/PANA-5681/rum-heatmaps
Jun 1, 2026
Merged

PANA-5681: Integrate HeatmapIdentifierRegistry into RUM for heatmaps [3 of 4]#3205
jonathanmos merged 5 commits into
feature/heatmapsfrom
gonzalezreal/PANA-5681/rum-heatmaps

Conversation

@gonzalezreal

@gonzalezreal gonzalezreal commented Feb 27, 2026

Copy link
Copy Markdown

What does this PR do?

Integrates heatmap tap data into the RUM feature. When a tap gesture is detected and the view is attached to a window, GesturesListener captures the touch coordinates, the view's dimensions, and (when available) its heatmap identifier from the HeatmapIdentifierRegistry, and packages them into a new HeatmapActionData object. This data flows through AdvancedRumMonitor.addActionWithHeatmap — an internal API that keeps HeatmapActionData off the public RumMonitor interface — into RumActionScope, where it is serialised into the dd.action field of the outgoing ActionEvent. RumFeature now implements HeatmapIdentifierRegistryProvider, exposing its lazily-initialised registry to Session Replay via FeatureScope.unwrap() without going through the untyped feature-context map.

Motivation

Support mobile heatmaps. This is PR 3 of 4, integrates the HeatmapIdentifierRegistry (#3202) and updated schemas (#3203) into RUM.

Additional Notes

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)

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

Copy link
Copy Markdown

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: 087cbc56d0

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

@gonzalezreal gonzalezreal force-pushed the gonzalezreal/PANA-5681/rum-heatmaps branch from 7c039dc to e76417d Compare February 27, 2026 13:17
@datadog-datadog-prod-us1-2

This comment has been minimized.

@codecov-commenter

codecov-commenter commented Feb 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.52174% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.11%. Comparing base (81e4f04) to head (42f1e41).
⚠️ Report is 2 commits behind head on feature/heatmaps.

Files with missing lines Patch % Lines
...ndroid/rum/internal/domain/scope/RumActionScope.kt 84.21% 1 Missing and 2 partials ⚠️
...instrumentation/gestures/DatadogGesturesTracker.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           feature/heatmaps    #3205      +/-   ##
====================================================
+ Coverage             72.09%   72.11%   +0.02%     
====================================================
  Files                   964      967       +3     
  Lines                 35429    35499      +70     
  Branches               5880     5887       +7     
====================================================
+ Hits                  25542    25600      +58     
- Misses                 8278     8283       +5     
- Partials               1609     1616       +7     
Files with missing lines Coverage Δ
...oid/internal/heatmaps/HeatmapIdentifierRegistry.kt 100.00% <ø> (ø)
...ndroid/internal/heatmaps/HeatmapIdentifierStore.kt 88.89% <100.00%> (ø)
...atadog/android/internal/heatmaps/HeatmapViewKey.kt 100.00% <100.00%> (ø)
...atadog/android/internal/heatmaps/TapTargetUtils.kt 100.00% <100.00%> (ø)
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 86.25% <100.00%> (+0.17%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 93.04% <100.00%> (+0.48%) ⬆️
...oid/rum/internal/domain/scope/HeatmapActionData.kt 100.00% <100.00%> (ø)
...d/rum/internal/domain/scope/RumApplicationScope.kt 94.57% <100.00%> (+0.13%) ⬆️
...g/android/rum/internal/domain/scope/RumRawEvent.kt 100.00% <100.00%> (ø)
...droid/rum/internal/domain/scope/RumSessionScope.kt 91.08% <100.00%> (+0.06%) ⬆️
... and 7 more

... and 39 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 changed the title PANA-5681: Integrate ViewIdentityResolver into RUM for heatmaps PANA-5681: Integrate ViewIdentityResolver into RUM for heatmaps [3 of 4] May 5, 2026
@jonathanmos jonathanmos marked this pull request as draft May 5, 2026 10:51
@jonathanmos jonathanmos force-pushed the gonzalezreal/PANA-5681/schema-updates branch from ec4040e to 81e4f04 Compare May 13, 2026 08:29
Base automatically changed from gonzalezreal/PANA-5681/schema-updates to feature/heatmaps May 13, 2026 11:51
@jonathanmos jonathanmos force-pushed the gonzalezreal/PANA-5681/rum-heatmaps branch 2 times, most recently from cbfbf76 to 9a2e330 Compare May 14, 2026 12:23
@jonathanmos jonathanmos changed the title PANA-5681: Integrate ViewIdentityResolver into RUM for heatmaps [3 of 4] PANA-5681: Integrate HeatmapIdentifierRegistry into RUM for heatmaps [3 of 4] May 14, 2026
@jonathanmos jonathanmos force-pushed the gonzalezreal/PANA-5681/rum-heatmaps branch from 9a2e330 to e63b7f4 Compare May 18, 2026 08:12
@jonathanmos jonathanmos marked this pull request as ready for review May 18, 2026 09:07
@jonathanmos

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

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

kikoveiga
kikoveiga previously approved these changes May 25, 2026
0xnm
0xnm previously approved these changes May 26, 2026
@jonathanmos jonathanmos dismissed stale reviews from 0xnm and kikoveiga via eef69a5 May 28, 2026 11:57
@jonathanmos jonathanmos force-pushed the gonzalezreal/PANA-5681/rum-heatmaps branch from eef69a5 to 6210b4b Compare May 28, 2026 12:55
@jonathanmos jonathanmos force-pushed the gonzalezreal/PANA-5681/rum-heatmaps branch from 6210b4b to fa8baf8 Compare May 28, 2026 13:19
* = true on Android but never receive touch events, so the RUM gesture layer never fires for
* them. Excluding `isEnabled` here keeps the predicate identical to RUM's existing behaviour.
*/
fun View.isValidTapTarget(): Boolean {

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 we need to have it in -internal module? seems like it is used only in -rum.

normally -internal module shouldn't be visible on the user side, but if they add it, they will have this extension.

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.

It will be used also by session replay in the next pr

0xnm
0xnm previously approved these changes Jun 1, 2026
@jonathanmos jonathanmos merged commit ac886da into feature/heatmaps Jun 1, 2026
26 checks passed
@jonathanmos jonathanmos deleted the gonzalezreal/PANA-5681/rum-heatmaps branch June 1, 2026 09: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.

6 participants