Skip to content

Investigate RUMS-4937: Compose view tracking requires NavigationViewTrackingEffect#3359

Closed
mariusc83 wants to merge 1 commit intodevelopfrom
mariusc83/RUMS-4937/cant-track-rum-views-compose
Closed

Investigate RUMS-4937: Compose view tracking requires NavigationViewTrackingEffect#3359
mariusc83 wants to merge 1 commit intodevelopfrom
mariusc83/RUMS-4937/cant-track-rum-views-compose

Conversation

@mariusc83
Copy link
Copy Markdown
Member

Investigation for RUMS-4937

Jira: RUMS-4937

Issue Summary

Customer cannot track RUM views in Compose because they use @ComposeInstrumentation on individual screen composables and avoid NavigationViewTrackingEffect, believing it forces them to use route strings as view names.

Root Cause

@ComposeInstrumentation is a SOURCE-retention annotation. The Gradle plugin only injects InstrumentedNavigationViewTrackingEffect into composables containing NavHost — not individual screen composables. Without NavigationViewTrackingEffect in the composition tree, ComposeNavigationObserver is never created and no view events are sent.

What These Tests Prove

  1. ComposeNavigationObserver.onDestinationChanged() is the only mechanism for Compose view tracking — it must be registered as a NavController listener via NavigationViewTrackingEffect
  2. ComponentPredicate.getViewName() already supports returning custom human-readable names — the customer's stated objection to using NavigationViewTrackingEffect is unfounded

Recommendation

Documentation update: clarify that @ComposeInstrumentation is only for action tracking (when placed on NavHost-containing composables) and that NavigationViewTrackingEffect is mandatory for view tracking. Show the ComponentPredicate pattern for custom view names.


Generated by rum:tee-triage-insights

@mariusc83 mariusc83 closed this Apr 9, 2026
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.

1 participant