feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

feat(core): Extract text from children of touched components for breadcrumb labels - #6106

Merged
antonis merged 14 commits into
mainfrom
antonis/issue-6097
May 11, 2026
Merged

feat(core): Extract text from children of touched components for breadcrumb labels#6106
antonis merged 14 commits into
mainfrom
antonis/issue-6097

Conversation

@antonis

@antonisantonis commented May 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Walks the React fiber tree downward (child/sibling pointers) to extract text content from children of touched components. This text is used as a lowest-priority label fallback when no explicit label (sentry-label, custom labelKey) is set.

For example, a button like:

<TouchableOpacityonPress={save}><Text>Save workout</Text></TouchableOpacity>

will now produce a breadcrumb with label "Save workout" instead of just "TouchableOpacity".

Masking behavior

  • When maskAllText is enabled (the default for replay users): text extraction is automatically disabled to avoid leaking masked content via breadcrumbs. No behavior change for these users.
  • When maskAllText is explicitly false: text extraction is enabled.
  • When MobileReplay integration is not installed: text extraction is enabled. This is a behavior change — users without replay will now see text labels in their touch breadcrumbs where previously they only saw component names. This can surface new data in breadcrumbs (component text content). Users can opt out via extractTextFromChildren: false on TouchEventBoundary.
  • Per-view Sentry.Mask boundaries are respected: text inside <Sentry.Mask> is never extracted.

Safety limits

  • Max text length: 64 characters (truncated with ...)
  • Max depth: 3 levels of child traversal
  • Max siblings: 5 per level (prevents runaway traversal in long lists)

New prop

extractTextFromChildren (default true) — set to false to opt out entirely.

Label priority (lowest to highest)

  1. Extracted text children ← new
  2. Custom labelKey prop value
  3. sentry-label prop

💡 Motivation and Context

Touch breadcrumbs currently produce unhelpful labels like "Touch event within element: View" which makes Session Replay AI summaries and issue debugging less useful. This change automatically extracts meaningful labels from component text content.

Closes#6097

💚 How did you test it?

  • 11 new unit tests covering: basic extraction, nested children, siblings, truncation, masking gate (maskAllText: true, false, undefined), Sentry.Mask boundary, priority over extracted text, extractTextFromChildren: false opt-out, raw text fiber nodes, integration without options
  • All 31 touchevents tests pass
  • Type check passes (no new TS errors)
  • Lint passes (0 warnings, 0 errors)

📝 Checklist

🔮 Next steps

antonisand others added 2 commits May 7, 2026 10:57
…dcrumb labels
Walks the React fiber tree downward (child/sibling) to extract text content
from touched components as a lowest-priority label fallback. Gated on Session
Replay's maskAllText setting and respects per-view Sentry.Mask boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Extract text from children of touched components for breadcrumb labels by antonis in #6106
  • chore(deps): bump fast-uri from 3.0.1 to 3.1.2 by dependabot in #6121
  • chore(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by dependabot in #6120
  • chore(deps): bump socks to ^2.8.8 to fix ip-address vulnerability by antonis in #6117
  • chore(deps): bump uuid to ^13.0.1 to fix buffer bounds check vulnerability by antonis in #6118
  • test(replay): Add passthrough tests for device-state replay breadcrumbs by antonis in #6115
  • chore(deps): update JavaScript SDK to v10.52.0 by github-actions in #6108
  • chore(deps): bump basic-ftp from 5.3.0 to 5.3.1 by dependabot in #6111

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented May 7, 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 ae22e6c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

@sentry review

@antonis

Copy link
Copy Markdown
ContributorAuthor

@cursor review

Comment threadpackages/core/src/js/touchevents.tsx
antonisand others added 4 commits May 7, 2026 11:43
…raction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The prop defaults to true but effective behavior depends on maskAllText,
which defaults to true in mobileReplayIntegration, disabling extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review May 7, 2026 11:05
Comment threadCHANGELOG.md Outdated
Comment threadpackages/core/src/js/touchevents.tsx
…child fibers
In real React Native fiber trees, <Text>Hello</Text> has both
memoizedProps.children = 'Hello' on the Text fiber and a child HostText
fiber with memoizedProps = 'Hello'. Skip child recursion when
props.children is a string to avoid collecting the same text twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f14d1f9. Configure here.

Comment threadpackages/core/src/js/touchevents.tsx
Comment threadpackages/core/test/touchevents.test.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx Outdated
Comment threadpackages/core/src/js/touchevents.tsx
@lucas-zimerman

Copy link
Copy Markdown
Collaborator

Would it be possible to add a depth limit & sibling limit test?

antonisand others added 3 commits May 8, 2026 16:18
…perty
Address review feedback: default to not extracting text when the
MobileReplay integration exists but has no options, consistent with the
safe-by-default masking behavior. Fix misleading test name/assertion
and add @default JSDoc tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add a depth limit & sibling limit test?

Good idea 👍 Added with 6fdacc4

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 11, 2026
@sentry

sentryBot commented May 11, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.0 (87)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3838.73 ms1216.71 ms-2622.02 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1183.90 ms1187.50 ms3.60 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
890d145+dirty1223.59 ms1231.37 ms7.78 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
8929511+dirty1216.42 ms1219.02 ms2.60 ms
4b87b12+dirty1212.90 ms1222.09 ms9.19 ms
7ac3378+dirty1213.37 ms1218.15 ms4.78 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
5569641+dirty3839.22 ms1231.30 ms-2607.91 ms
c004dae+dirty3850.32 ms1227.79 ms-2622.53 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time408.41 ms445.86 ms37.45 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4953e94+dirty442.02 ms456.52 ms14.50 ms
04207c4+dirty459.19 ms518.54 ms59.35 ms
2c735cc+dirty414.09 ms438.47 ms24.38 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
d2eadf8+dirty414.64 ms454.56 ms39.92 ms
c004dae+dirty412.86 ms481.50 ms68.64 ms
ad66da3+dirty468.46 ms533.56 ms65.10 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms

App size

RevisionPlainWith SentryDiff
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
04207c4+dirty43.75 MiB48.12 MiB4.37 MiB
2c735cc+dirty43.75 MiB48.08 MiB4.33 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3821.24 ms1229.15 ms-2592.09 ms
Size5.15 MiB6.67 MiB1.51 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3817909+dirty1210.76 ms1215.64 ms4.89 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
890d145+dirty1212.98 ms1220.10 ms7.12 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
8929511+dirty1223.41 ms1222.49 ms-0.92 ms
4b87b12+dirty1199.49 ms1199.78 ms0.29 ms
7ac3378+dirty1202.35 ms1198.31 ms-4.04 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
5569641+dirty3824.35 ms1210.78 ms-2613.57 ms
c004dae+dirty3857.82 ms1224.87 ms-2632.95 ms

App size

RevisionPlainWith SentryDiff
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
890d145+dirty3.38 MiB4.77 MiB1.38 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
8929511+dirty3.38 MiB4.80 MiB1.42 MiB
4b87b12+dirty3.38 MiB4.77 MiB1.39 MiB
7ac3378+dirty3.38 MiB4.76 MiB1.38 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
5569641+dirty5.15 MiB6.67 MiB1.51 MiB
c004dae+dirty5.15 MiB6.67 MiB1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time405.50 ms442.51 ms37.01 ms
Size48.30 MiB53.49 MiB5.19 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
8929511+dirty469.49 ms502.65 ms33.16 ms
23598c3+dirty371.92 ms420.65 ms48.74 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
5c1e987+dirty444.71 ms475.13 ms30.42 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
7ac3378+dirty410.67 ms442.60 ms31.92 ms
4953e94+dirty398.80 ms431.81 ms33.01 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms

App size

RevisionPlainWith SentryDiff
8929511+dirty43.94 MiB49.02 MiB5.08 MiB
23598c3+dirty43.94 MiB49.02 MiB5.08 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
5c1e987+dirty43.94 MiB48.94 MiB5.00 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
7ac3378+dirty43.94 MiB48.99 MiB5.05 MiB
4953e94+dirty43.94 MiB48.94 MiB5.00 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB

@antonis
antonis merged commit 5a21b51 into mainMay 11, 2026
112 of 128 checks passed
@antonis
antonis deleted the antonis/issue-6097 branch May 11, 2026 08:15
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
)
## DESCRIBE YOUR PR
Documents new touch breadcrumb label features in the React Native SDK
(v8.12.0):
- **Automatic `sentry-label` injection** — build-time label injection
from static text via the Babel plugin, enabled by default with
`annotateReactComponents`
([sentry-react-native#6141](getsentry/sentry-react-native#6141))
- **Runtime text extraction from children** — `extractTextFromChildren`
prop extracts text from child fiber nodes as a label fallback
([sentry-react-native#6106](getsentry/sentry-react-native#6106))
- **Session Replay masking interaction** — `sentry-label` and text
extraction respect `maskAllText` and `Sentry.Mask` boundaries
([sentry-react-native#6142](getsentry/sentry-react-native#6142))
- **Updated label priority chain** — now 6 steps including text
extraction and masking notes
### Files changed
- `docs/platforms/react-native/configuration/touchevents.mdx` — new h2
sections for automatic label injection, text extraction, masking
interaction; updated label priority; added `extractTextFromChildren` to
options
- `docs/platforms/react-native/integrations/component-names.mdx` — new
section for `autoInjectSentryLabel` with disable examples
Closesgetsentry/sentry-react-native#6113
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.)
- [ ] Other deadline
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after the above implementation is shipped in 8.12.0
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…breadcrumbs (#17665)
## DESCRIBE YOUR PR
Document the new text extraction from children feature for React Native
touch breadcrumbs.
- Add text content from children as item 6 in the label priority list
- Document the `extractTextFromChildren` option
- Add Alert about masking behavior (disabled when `maskAllText` is on,
respects `Sentry.Mask`)
- Update user interaction instrumentation docs to mention text children
fallback
**Depends on #17650** (label fallbacks docs) — based on that branch.
**Companion SDK PR:**
getsentry/sentry-react-native#6106
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline (GA date, etc.):
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6106 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-mergeTriggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract text children from touchable components for breadcrumb labels

2 participants

@antonis@lucas-zimerman