Repository navigation
feat(nav3): [Part 3] Record why back stack entries are /unknown - #6781
Merged
0xadam-brown merged 0 commit intoNov 27, 2026
Merged
Conversation
Contributor
PR risk: not classifiedFor commit The last run ended with status |
Contributor
|
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-3
branch
from
November 25, 2026 15:34
e97547e to
c3bbd3c
Compare
📲 Install BuildsAndroid
|
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-3
branch
from
November 25, 2026 16:31
c3bbd3c to
cfbf6ca
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-3
branch
from
November 27, 2026 15:16
cfbf6ca to
fb33ea0
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-7
branch
from
November 27, 2026 15:16
6937bd5 to
c8bea42
Compare
4 of 9 tasks
Member
Author
|
Replaced by #6801. Reordering the stack (this change now comes before the |
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.SerialNameAndPropertieswill follow in its own stack.📜 Description
When Sentry can't name a back stack entry, it records the entry as
/unknown. Until now, that's all it recorded. This PR records the reason next to the entry, underunknown_entry_reason:unknown_entry_reasonto_unknown_entry_reason,from_unknown_entry_reasonunknown_entry_reasonBreadcrumbs add the
to_andfrom_prefixes their other keys use (to_arguments,from_arguments), as each describes two entries. Sentry stores these keys in alphabetical order, so the reason appears right afterentryin the back stack, or afterentry_argumentsif the entry has arguments.For example, a back stack whose top entry has a named companion object, minified by R8 with kotlinx.serialization 1.7.3:
The reasons are a fixed set and contain no app data or class names:
unmappednullmapping_failedblank_namenot_serializableSerialName: the entry's class isn't@Serializablegeneric_typeSerialName: the entry's class has type parametersserializer_not_foundSerialName: no serializer was found, e.g., because R8 removed what the lookup needsserializer_lookup_threwSerialName: reading the class's annotations, serializer, or descriptor threwkotlinx_serialization_versionSerialNamecouldn't be created, as the app's kotlinx.serialization version is incompatibleThe transaction name stays
/unknown, so unnamed screens don't add transaction names.How
SerialNamereports its reasonmap()returningnullis public API, and apps build on it (SerialName.map(entry) ?: fallback), soSerialNamestill returnsnull. It reports the reason through an internal per-thread side channel thatBackStackConverterclears and reads around each call to the app's mapper. As a result:SerialName'snullforwards its reason too;nullitself recordsunmapped.Each type's reason is cached along with its failure, so it's looked up once. Generic
@Serializabletypes are now detected before the serializer lookup, which can't find their serializers either, so they recordgeneric_typeand log a warning that says so.💡 Motivation and Context
/unknownalone doesn't say what went wrong. "Not@Serializable", "R8 removed the serializer", "kotlinx.serialization is incompatible", and "the app's own mapper chose not to name it" all look the same. Many of theSerialNamefailures only happen in minified release builds, where nobody reads the SDK's debug logs. And all unnamed screens share one transaction name, so a broken setup can look like an app with few screens rather than a problem.This records the reason where users already look, without changing the public
map()contract.addresses: JAVA-787 (link)
"unknown_entry_reason": "mapping_failed"instead of"dropped_by_sentry": "mapping_failed"in the entry's arguments, so one cause has one name.mapping_failedshipped in 8.65.1 as an argument drop reason, so this changes a released value. The CHANGELOG says so.nav.unknown_entry_reasontransaction tag. That's a product question, and the tag is easy to add later.💚 How did you test it?
UnknownEntryReasonReportsTest), each reason through the converter, observer, and transaction request, and eachSerialNamereason (KotlinxBackStackEntryMapperUnknownEntryReasonTest)SentryNavEffectTestend to end through Compose📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
@Serializabletypes fail and none succeed) and log one summary warning.