PANA-5681: Integrate ViewIdentityResolver into Session Replay for heatmaps#3206
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39a5a2b5af
ℹ️ 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".
...com/datadog/android/sessionreplay/internal/recorder/resources/DefaultImageWireframeHelper.kt
Outdated
Show resolved
Hide resolved
| * Retrieves [ViewIdentityResolver] from RUM's feature context, or [NoOpViewIdentityResolver] if unavailable. | ||
| */ | ||
| internal fun FeatureSdkCore.getViewIdentityResolver(): ViewIdentityResolver { | ||
| val rumContext = getFeatureContext(Feature.RUM_FEATURE_NAME) |
There was a problem hiding this comment.
Avoid blocking feature-context reads in draw hot path
getViewIdentityResolver() calls getFeatureContext(Feature.RUM_FEATURE_NAME) with the default useContextThread=true; in DatadogCore.getFeatureContext this path submits work to the context executor and waits for the result synchronously. Because this helper is now used during on-draw snapshot capture (and also from image wireframe mapping), the render-time path adds avoidable cross-thread blocking lookups each frame, which can introduce jank on view-heavy/image-heavy screens.
Useful? React with 👍 / 👎.
39a5a2b to
2f8955a
Compare
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## gonzalezreal/PANA-5681/rum-heatmaps #3206 +/- ##
=======================================================================
+ Coverage 71.40% 71.46% +0.07%
=======================================================================
Files 930 933 +3
Lines 34578 34610 +32
Branches 5845 5846 +1
=======================================================================
+ Hits 24688 24734 +46
+ Misses 8251 8245 -6
+ Partials 1639 1631 -8
🚀 New features to boost your workflow:
|
What does this PR do?
Wires
ViewIdentityResolverinto Session Replay to populatepermanentIdon wireframes. This enables correlating wireframes with RUM action events for heatmap visualization.Key changes:
ViewIdentityProviderinterface for Session Replay's view identity resolutionViewIdentityResolver(from RUM feature context) viaViewIdentityResolverAdapterviewIdentityProvidertoMappingContextfor use by all wireframe mapperspermanentIdin all wireframe types (Shape, Text, Image, Placeholder, Webview)onWindowRefreshed()on each draw pass to index the current view hierarchyMotivation
Support mobile heatmaps. This is the final piece connecting Session Replay wireframes to RUM actions.
Additional Notes
MappingContextForgeryFactoryinsession-replay-composeandsession-replay-materialtest suites.Review checklist (to be filled by reviewers)