PANA-5681: Integrate ViewIdentityResolver into Session Replay for heatmaps [4 of 4]#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".
| * 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 72.13% 72.10% -0.03%
=======================================================================
Files 963 966 +3
Lines 35540 35572 +32
Branches 5910 5911 +1
=======================================================================
+ Hits 25636 25649 +13
- Misses 8288 8297 +9
- Partials 1616 1626 +10
🚀 New features to boost your workflow:
|
ViewIdentityResolver into Session Replay for heatmapsViewIdentityResolver into Session Replay for heatmaps [4 of 4]
…aps' into gonzalezreal/PANA-5681/session-replay-heatmaps
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)