Repository navigation
feat(nav3): Add the built-in SerialName BackStackEntryMapper - #6780
Open
0xadam-brown wants to merge 1 commit into
Open
0xadam-brown wants to merge 1 commit into
0xadam-brown wants to merge 1 commit into
Conversation
This was referenced Nov 25, 2026
Contributor
|
5 of 9 tasks
📲 Install BuildsAndroid
|
4 of 9 tasks
0xadam-brown
marked this pull request as ready for review
November 27, 2026 17:23
0xadam-brown
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 30, 2026
Update Android navigation docs to describe the SerialName built-in mapper from [sentry-java#6780](getsentry/sentry-java#6780). Describe mapper selection, privacy behavior, and serializer lookup caveats. Update examples to use built-in mapping and a selective custom fallback.
0xadam-brown
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 30, 2026
Update Android navigation docs to describe the SerialName built-in mapper from [sentry-java#6780](getsentry/sentry-java#6780). Describe mapper selection, privacy behavior, and serializer lookup caveats. Update examples to use built-in mapping and a selective custom fallback.
This was referenced Dec 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Nav3 SerialName Mapper)
This stack replaces the
SerialNamehalf of #6696. TheSerialNameAndPropertiesmapper will follow in its own stack.📜 Description
PR stack adds
BackStackEntryMapper.SerialName, a built-in mapper for apps whose Nav3 back stack keys are@Serializable.Each entry is named after its kotlinx.serialization serial name. (A built-in mapper that records both the serial name and properties of each back stack entry will be introduced in the next PR stack.)
Before
Extracting Sentry data from back stack entries was the responsibility of host apps via custom implementations of the
BackStackEntryMapperinterface. Like this:After
Now host apps can use the built-in mapper instead of implementing their own ...
...or as a fallback within their own custom mapper:
Bonus points
I've also introduced:
/unknown, whether for built-in mappers or (existing) custom mappers (see the newunknown_entry_reasonfield);And as usual the first PR does a bit of refactoring to make sure we're keeping things tidy.
PR by PR
unknown_entry_reasonfor any mapper:unmapped,blank_name, andmapping_failedSerialNamemapper, itsSerialName-specific reasons, and kotlinx.serialization 1.7.3+ as acompileOnlydependencySerialName💡 Motivation and Context
With Nav3, host apps manage their own nav back stack, which they implement as a list of arbitrarily typed entries. In order to be displayed in Sentry, each of those entries has to be mapped to a Sentry name (e.g., ProductDetailScreen) and zero or more arguments (e.g., productId="123abc"). There are two ways for us to get those mappings:
BackStackEntryMapperthe host app implements itself; orSupporting SAGP auto-instrumentation for Nav3 relies on (2). This PR stack and the
SerialNameAndPropertiesstack (#6696) give us the mappers we need. (Nav3 auto-instrumentation will be implemented in subsequent PRs.)addresses: JAVA-787 (link)
💚 How did you test it?
(See each PR.)
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
SerialNameand theunknown_entry_reasonvalues in sentry-docs, including the Troubleshooting section the KDoc links to.SerialNameAndProperties.🤖 Generated with Claude Code
#skip-changelog