Skip to content

PANA-5681: Add HeatmapIdentifier infrastructure [1 of 4]#3202

Merged
jonathanmos merged 6 commits into
feature/heatmapsfrom
gonzalezreal/PANA-5681/view-identity-resolver
May 13, 2026
Merged

PANA-5681: Add HeatmapIdentifier infrastructure [1 of 4]#3202
jonathanmos merged 6 commits into
feature/heatmapsfrom
gonzalezreal/PANA-5681/view-identity-resolver

Conversation

@gonzalezreal

@gonzalezreal gonzalezreal commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Introduces the foundational shared component for mobile heatmaps: a HeatmapIdentifierRegistry in the internal module that Session Replay writes to and RUM reads from. The store holds an atomic snapshot of view identities (keyed by view ID) that SR publishes after each window traversal; RUM's gesture listener will then look up the identifier for a tapped view and, if found, attaches it alongside the view's dimensions and touch position to the action event. The implementation uses a ReentrantReadWriteLock so SR's writes (full snapshot replacement) never block concurrent RUM reads.

This PR introduces only the data contracts (HeatmapIdentifier, HeatmapIdentifierRegistry, HeatmapIdentifierStore) in dd-sdk-android-internal. The cross-feature wiring will follow in the rum-heatmaps PR: a new HeatmapsFeature : Feature will live in dd-sdk-android-rum, hold a HeatmapIdentifierRegistry, and be registered on SdkCore by RumFeature during initialization — mirroring how SessionReplayFeature registers its sibling ResourcesFeature. Session Replay will then read the registry via sdkCore.getFeature(HEATMAPS_FEATURE_NAME), matching the iOS architecture (where HeatmapIdentifierRegistryFeature is registered on the core and consumed by SR through the same lookup path). The companion factory HeatmapIdentifierRegistry.create() stays in this PR as the constructor seam that lets HeatmapsFeature build a registry without exposing HeatmapIdentifierStore outside dd-sdk-android-internal.

Motivation

Support mobile heatmaps. This is PR 1 of 4, the foundational infrastructure that RUM and Session Replay will build on.

Additional Notes

Ported from #3164. Self-contained with no dependency on schema changes.

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: cebbd7bc94

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

@0xnm 0xnm left a comment

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.

I went only through the production source files so far and left some comments.

Comment thread dd-sdk-android-internal/api/apiSurface Outdated
@jonathanmos
jonathanmos marked this pull request as draft May 5, 2026 09:59
@codecov-commenter

codecov-commenter commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.06%. Comparing base (917611f) to head (916b114).

Files with missing lines Patch % Lines
...dog/android/internal/heatmaps/HeatmapIdentifier.kt 77.78% 3 Missing and 1 partial ⚠️
...ndroid/internal/heatmaps/HeatmapIdentifierStore.kt 88.89% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           feature/heatmaps    #3202      +/-   ##
====================================================
+ Coverage             71.99%   72.06%   +0.06%     
====================================================
  Files                   961      964       +3     
  Lines                 35401    35429      +28     
  Branches               5876     5880       +4     
====================================================
+ Hits                  25486    25529      +43     
+ Misses                 8301     8285      -16     
- Partials               1614     1615       +1     
Files with missing lines Coverage Δ
...oid/internal/heatmaps/HeatmapIdentifierRegistry.kt 100.00% <100.00%> (ø)
...ndroid/internal/heatmaps/HeatmapIdentifierStore.kt 88.89% <88.89%> (ø)
...dog/android/internal/heatmaps/HeatmapIdentifier.kt 77.78% <77.78%> (ø)

... and 35 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: Add ViewIdentityResolver infrastructure PANA-5681: Add ViewIdentityResolver infrastructure [1 of 4] May 5, 2026
@jonathanmos
jonathanmos force-pushed the gonzalezreal/PANA-5681/view-identity-resolver branch from e4607af to 6b5f91a Compare May 6, 2026 10:36
@jonathanmos
jonathanmos force-pushed the gonzalezreal/PANA-5681/view-identity-resolver branch from 6b5f91a to 3e2c2ab Compare May 7, 2026 09:34
@jonathanmos
jonathanmos marked this pull request as ready for review May 7, 2026 12:16
@ambushwork

Copy link
Copy Markdown
Member

@codex review

@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: 3e2c2ab8a6

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

@jonathanmos
jonathanmos requested review from 0xnm and ambushwork May 7, 2026 13:27
@jonathanmos
jonathanmos force-pushed the gonzalezreal/PANA-5681/view-identity-resolver branch from 7451809 to 77957a4 Compare May 11, 2026 08:32
@jonathanmos jonathanmos changed the title PANA-5681: Add ViewIdentityResolver infrastructure [1 of 4] PANA-5681: Add HeatmapIdentifier infrastructure [1 of 4] May 11, 2026
@jonathanmos
jonathanmos force-pushed the gonzalezreal/PANA-5681/view-identity-resolver branch from 77957a4 to ec32d76 Compare May 11, 2026 11:43
@jonathanmos
jonathanmos requested review from 0xnm and ambushwork May 11, 2026 12:53
ambushwork
ambushwork previously approved these changes May 11, 2026
0xnm
0xnm previously approved these changes May 11, 2026
Comment thread detekt_custom_safe_calls.yml Outdated
@jonathanmos
jonathanmos dismissed stale reviews from 0xnm and ambushwork via 916b114 May 12, 2026 07:00
@jonathanmos
jonathanmos requested review from 0xnm and ambushwork May 13, 2026 07:40
@jonathanmos
jonathanmos merged commit d616bfb into feature/heatmaps May 13, 2026
27 checks passed
@jonathanmos
jonathanmos deleted the gonzalezreal/PANA-5681/view-identity-resolver branch May 13, 2026 08:15
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.

5 participants