feat(android-nav3): [Android Nav3 3] Track navigation state transitions - #6131
0xadam-brown wants to merge 4 commits into
Conversation
|
📲 Install BuildsAndroid
|
729cbc7 to
a0704f7
Compare
7ea1f4c to
dc5546c
Compare
a0704f7 to
6a2c118
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6a2c118. Configure here.
dc5546c to
b0eb957
Compare
Add the observer layer that turns Navigation 3 back stack changes into breadcrumbs, scope state, and navigation transactions. This is also the point where the module starts carrying generated BuildConfig version metadata and its first non-empty API snapshot.
9e615c3 to
7e1db9e
Compare
| */ | ||
| @ApiStatus.Experimental | ||
| @Immutable | ||
| internal class SentryNavOptions |
There was a problem hiding this comment.
Marked as experimental b/c this will be made public in a follow-on to the current PR stack (same below).
Keep the hint internal for the current stack, but mark it experimental ahead of the follow-on public surface work. Also rename the key and field to match the Android hint naming pattern.
| public static final String ANDROID_NAV_DESTINATION = "android:navigationDestination"; | ||
|
|
||
| /** Used for Navigation 3 breadcrumbs. */ | ||
| @ApiStatus.Experimental @ApiStatus.Internal |
There was a problem hiding this comment.
Marked as experimental b/c this will be made public in a follow-on to the current PR stack.

PR Stack (Android Nav3)
📜 Description
Now we wire up the logic for consuming the host app's back stack and emitting finished Sentry data. The class responsible for doing so is
BackStackObserver.It rotates the ambient nav transaction and emits the following Sentry data every time the top of the back stack is updated:
SentryNavOptions.maxCapturedBackStackEntriesBackStackObsever makes use of the
RouteTranslatorfrom #6130 for the actual back stack entry -> raw Sentry data translation.💡 Motivation and Context
With route modeling in place, the next boundary is the state machine that reacts to navigation changes. Keeping that behavior separate makes it easier to review lifecycle and tracing semantics without mixing in Compose effect concerns yet.
addresses: JAVA-274
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Introduce the Compose-facing effect that owns this observer in application code.
#skip-changelog