Skip to content

feat(nav3): [Part 2] Record why back stack entries are /unknown - #6801

Merged
0xadam-brown merged 2 commits into
feat/nav3-serial-name-stack-basefrom
feat/nav3-serial-name-stack-3
Dec 4, 2026
Merged

0xadam-brown merged 2 commits into
feat/nav3-serial-name-stack-basefrom
feat/nav3-serial-name-stack-3

Conversation

@0xadam-brown

@0xadam-brown 0xadam-brown commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Nav3 SerialName Mapper)


📜 Description

When our Nav3 integration 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 under a new unknown_entry_reason field:

Where Key
Back stack in the Navigation context unknown_entry_reason
Navigation breadcrumbs to_unknown_entry_reason, from_unknown_entry_reason
Navigation transaction data unknown_entry_reason

Breadcrumbs add the to_ and from_ prefixes their other keys use (to_arguments, from_arguments), as each describes two entries.

For example, a back stack whose top entry's mapper returned null:

"Back Stack": [
  { "entry": "/unknown", "unknown_entry_reason": "unmapped" },
  { "entry": "/Home" }
]

This PR adds the reasons that apply to any mapper:

Reason Meaning
unmapped The mapper returned null
mapping_failed The mapper threw
blank_name The mapper returned a blank name (its arguments are kept)

Part 3 (#6703) adds the reasons specific to the new SerialName mapper, and the side channel it uses to report them while still returning null.

💡 Motivation and Context

/unknown alone doesn't say what went wrong. A mapper that threw, returned a blank name, or chose not to name an entry all look the same outside 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.

(Note: This PR replaces #6781. A restack that moved this change below the SerialName mapper caused GitHub to mark #6781 as merged, though nothing was merged. Its earlier review discussion is still there.)

addresses: JAVA-787 (link)

⚠️ Callouts

  • Behavior change: a mapper that throws now records "unknown_entry_reason": "mapping_failed" instead of "dropped_by_sentry": "mapping_failed" in the entry's arguments, so one cause has one name. mapping_failed shipped in 8.65.1 as an argument drop reason, so this changes a released value. The CHANGELOG says so.
  • Not added: a searchable nav.unknown_entry_reason transaction tag. That's a product question, and the tag is easy to add later.

💚 How did you test it?

  • Unit tests
  • Manual tests via the Nav3 sample app

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

  • Document the reasons in sentry-docs' Troubleshooting section.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 678f30c.

Main concerns: data sent to Sentry, reach, host performance.

This label is a hint for reviewers, not an approval.

@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 678f30c

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 27, 2026
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-stack-3 branch from fb33ea0 to 9909415 Compare November 27, 2026 15:27
@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Nov 27, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 27, 2026
@sentry

sentry Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.67.0 (1) release

⚙️ sentry-android Build Distribution Settings

Base automatically changed from feat/nav3-serial-name-mappers-6 to feat/nav3-serial-name-stack-base December 4, 2026 13:16
@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Dec 4, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 4, 2026
0xadam-brown and others added 2 commits December 4, 2026 14:29
An entry recorded as /unknown didn't say why, so outside debug logs a
mapper that threw, returned a blank name, or chose not to name an entry
all looked the same. Record the reason next to the entry as
unknown_entry_reason in the back stack context and the nav
transaction's data, and as to_unknown_entry_reason and
from_unknown_entry_reason on breadcrumbs.

The values are mapping_failed, blank_name, and unmapped. A mapper that
throws now records mapping_failed as its unknown entry reason instead
of as its arguments' drop reason, so one cause has one name.
…unknown

Fatal errors a BackStackEntryMapper throws, such as an OutOfMemoryError or a LinkageError,
propagate instead of falling back to /unknown. The KDoc now says so, and rewords the fallback
paragraph to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xadam-brown
0xadam-brown force-pushed the feat/nav3-serial-name-stack-3 branch from 199a45c to 678f30c Compare December 4, 2026 13:36
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 4, 2026
@0xadam-brown
0xadam-brown merged commit e0c5425 into feat/nav3-serial-name-stack-base Dec 4, 2026
34 checks passed
@0xadam-brown
0xadam-brown deleted the feat/nav3-serial-name-stack-3 branch December 4, 2026 13:54
0xadam-brown added a commit that referenced this pull request Dec 4, 2026
…me-mappers-base

Brings in the SerialName stack, restacked after #6801 merged. Its content
is unchanged, so this merge keeps the branch's tree as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants