Skip to content

feat(nav3): [Part 4] Add a lazily encoding argument source for kotlinx properties - #6751

Draft
0xadam-brown wants to merge 1 commit into
feat/nav3-serial-name-mappers-8from
feat/nav3-serial-name-mappers-argument-source
Draft

0xadam-brown wants to merge 1 commit into
feat/nav3-serial-name-mappers-8from
feat/nav3-serial-name-mappers-argument-source

Conversation

@0xadam-brown

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

Copy link
Copy Markdown
Member

PR Stack (Nav3 Serial Name Mappers)

Former parts 1–3 merged into main as #6697, #6698, and #6699; preparatory refactors merged in #6749. Two other former parts merged separately as #6713 and #6714.


📜 Description

PR adds KotlinxArgumentSource, the ArgumentSource (see Part 1) that the built-in SerialNameAndProperties mapper (Part 5) uses to turn a back stack entry's kotlinx.serialization properties into Sentry arguments.

  • When the ArgumentSanitizer writes the source to its sink, the source encodes the entry's properties straight into that sink via KotlinxPropertiesEncoder (Part 3). The properties are walked once, and they spend the same per-update argument budget as every other entry's arguments.
  • The source is also a Map, so a host app mapper that wraps a built-in mapper can read and filter its arguments. Read as a map, it encodes once on demand and caches the result.
  • A nonfatal encoding failure keeps the entry's name and drops its arguments with the new ArgumentDropReason.ENCODING_FAILED ({"dropped_by_sentry": "encoding_failed"}). KotlinxUnencodableArguments stands in for every entry's arguments when the app's kotlinx.serialization version can't run the encoder.

PR also extends the argument-conversion diagram in ArgumentConversion.kt with the built-in mapper side.

Nothing uses the source yet; Part 5 wires it into SerialNameAndProperties. It was split out of that PR to keep it reviewable.

💡 Motivation and Context

addresses: JAVA-787 (link)

💚 How did you test it?

Nav3 release unit tests, Spotless, Detekt, and ABI checks pass.

📝 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

Continue with Part 5: Add the built-in SerialNameAndProperties mapper.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

#skip-changelog

@github-actions

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 849c9d0

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

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 849c9d0.

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

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

@sentry

sentry Bot commented Nov 24, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

This branch has not been deployed

No deployments
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant