Skip to content

PANA-5681: Heatmaps#3164

Open
jonathanmos wants to merge 1 commit intodevelopfrom
jmoskovich/pana-5681/heatmaps-feature
Open

PANA-5681: Heatmaps#3164
jonathanmos wants to merge 1 commit intodevelopfrom
jmoskovich/pana-5681/heatmaps-feature

Conversation

@jonathanmos
Copy link
Member

@jonathanmos jonathanmos commented Jan 28, 2026

What does this PR do?

Track ui elements with unique identifiers that are sent as part of the wireframes. Also send this identifier with taps and in this way correlate taps with views.

Important note: currently in the json schemas the new property permanent_id does not appear last in the ordering. This means that we would technically be breaking backwards compatibility by using the change this way - so a decision on this is necessary before the pr could be merged. If the schemas are updated then the pr needs to incorporate those changes.

Motivation

Support heatmaps on mobile.

Additional Notes

Anything else we should know when reviewing?

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)

@jonathanmos jonathanmos force-pushed the jmoskovich/pana-5681/heatmaps-feature branch 7 times, most recently from a946128 to faf8b33 Compare January 29, 2026 12:31
@datadog-datadog-prod-us1

This comment has been minimized.

@jonathanmos jonathanmos force-pushed the jmoskovich/pana-5681/heatmaps-feature branch 2 times, most recently from e09f5bb to 79d52ab Compare January 29, 2026 18:28
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 90.04739% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.02%. Comparing base (b54d77f) to head (56efc15).
⚠️ Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...roid/internal/identity/ViewIdentityResolverImpl.kt 88.89% 2 Missing and 7 partials ⚠️
...nternal/recorder/mapper/CheckableTextViewMapper.kt 0.00% 3 Missing ⚠️
...instrumentation/gestures/DatadogGesturesTracker.kt 50.00% 2 Missing ⚠️
.../android/internal/identity/ViewIdentityResolver.kt 0.00% 1 Missing ⚠️
...lin/com/datadog/android/rum/internal/RumFeature.kt 90.91% 1 Missing ⚠️
...ndroid/rum/internal/domain/scope/RumActionScope.kt 93.33% 0 Missing and 1 partial ⚠️
...ernal/instrumentation/gestures/GesturesListener.kt 95.65% 1 Missing ⚠️
...play/internal/recorder/NoOpViewIdentityProvider.kt 0.00% 1 Missing ⚠️
...y/internal/recorder/ViewIdentityResolverAdapter.kt 66.67% 1 Missing ⚠️
...onreplay/internal/utils/ViewIdentityResolverExt.kt 66.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3164      +/-   ##
===========================================
+ Coverage    70.98%   71.02%   +0.05%     
===========================================
  Files          912      917       +5     
  Lines        33548    33709     +161     
  Branches      5640     5674      +34     
===========================================
+ Hits         23811    23941     +130     
- Misses        8158     8179      +21     
- Partials      1579     1589      +10     
Files with missing lines Coverage Δ
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 85.71% <100.00%> (+0.19%) ⬆️
...id/rum/internal/domain/event/RumEventSerializer.kt 94.23% <100.00%> (+0.14%) ⬆️
...d/rum/internal/domain/scope/RumApplicationScope.kt 95.35% <100.00%> (+0.90%) ⬆️
...droid/rum/internal/domain/scope/RumSessionScope.kt 91.67% <100.00%> (+0.05%) ⬆️
...d/rum/internal/domain/scope/RumViewManagerScope.kt 93.25% <100.00%> (+0.11%) ⬆️
.../android/rum/internal/domain/scope/RumViewScope.kt 94.77% <100.00%> (+0.65%) ⬆️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 88.78% <100.00%> (+0.03%) ⬆️
...nreplay/internal/recorder/SessionReplayRecorder.kt 95.56% <100.00%> (+0.03%) ⬆️
...essionreplay/internal/recorder/SnapshotProducer.kt 95.95% <100.00%> (+0.06%) ⬆️
...nternal/recorder/listener/WindowsOnDrawListener.kt 93.33% <100.00%> (+0.65%) ⬆️
... and 21 more

... and 29 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 force-pushed the jmoskovich/pana-5681/heatmaps-feature branch from 79d52ab to 1526987 Compare January 29, 2026 20:07
@jonathanmos jonathanmos force-pushed the jmoskovich/pana-5681/heatmaps-feature branch from 1526987 to 56efc15 Compare January 31, 2026 05:36
@jonathanmos jonathanmos marked this pull request as ready for review February 4, 2026 14:19
@jonathanmos jonathanmos requested a review from a team as a code owner February 4, 2026 14:19
Copy link

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

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: 56efc15ec1

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

Comment on lines +106 to +110
private fun buildRootCanonicalPath(root: View, screenNamespace: String): String {
val rootPathSegment = getViewPathSegment(root, null)
// Root view (e.g., DecorView) is not interactable, so we don't cache its identity.
// We only need its path as the prefix for descendant paths.
return "$appIdentifier/$screenNamespace/$rootPathSegment"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disambiguate root view identity across windows

When multiple windows are present (e.g., a dialog over an activity), buildRootCanonicalPath only prefixes the canonical path with appIdentifier/screenNamespace plus the root view path segment, but it does not incorporate any window-specific identifier. For root views like DecorView (no resource id, same class name), different windows on the same screen can yield identical root paths, which then produce identical permanentId values for corresponding view hierarchies. That breaks the “globally unique” guarantee and can merge heatmap taps across different windows. Consider including a window-specific token (e.g., window hash/z-order) or another root-unique discriminator in the root canonical path.

Useful? React with 👍 / 👎.

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.

2 participants