PANA-5681: Add HeatmapIdentifier infrastructure [1 of 4]#3202
Conversation
There was a problem hiding this comment.
💡 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
left a comment
There was a problem hiding this comment.
I went only through the production source files so far and left some comments.
…eal/PANA-5681/view-identity-resolver
Codecov Report❌ Patch coverage is 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
🚀 New features to boost your workflow:
|
ViewIdentityResolver infrastructureViewIdentityResolver infrastructure [1 of 4]
e4607af to
6b5f91a
Compare
6b5f91a to
3e2c2ab
Compare
|
@codex review |
There was a problem hiding this comment.
💡 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".
7451809 to
77957a4
Compare
ViewIdentityResolver infrastructure [1 of 4]HeatmapIdentifier infrastructure [1 of 4]
77957a4 to
ec32d76
Compare
What does this PR do?
Introduces the foundational shared component for mobile heatmaps: a
HeatmapIdentifierRegistryin 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)