Skip to content

feat(ios): Add attachAllThreads option - #5960

Merged
antonis merged 2 commits into
mainfrom
antonis/feat/attach-all-threads
Apr 7, 2026
Merged

feat(ios): Add attachAllThreads option#5960
antonis merged 2 commits into
mainfrom
antonis/feat/attach-all-threads

Conversation

@antonis

@antonisantonis commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Exposes the Cocoa SDK's attachAllThreads option (added in v9.9.0) so React Native users can configure it from JS via Sentry.init(). When enabled, full stack traces for all threads are attached to all captured events on iOS.

The option is automatically forwarded to the native iOS SDK via optionsWithDictionary: — no custom native bridge code is needed.

💡 Motivation and Context

Closes#5959

The Cocoa SDK v9.9.0 introduced attachAllThreads (sentry-cocoa#7764). This PR makes it available to RN users.

💚 How did you test it?

  • Added a test in wrapper.test.ts verifying the option is forwarded to initNativeSdk
  • All existing tests pass

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

Expose the Cocoa SDK's `attachAllThreads` option so it can be
configured from JS via `Sentry.init()`. When enabled, full stack
traces for all threads are attached to captured events on iOS.
Closes#5959
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actionsBot commented Apr 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(ios): Add attachAllThreads option by antonis in #5960
  • fix(core): Lazy-load Metro internal modules to prevent Expo 55 import errors by lucas-zimerman in #5958
  • chore(deps): update Cocoa SDK to v9.9.0 by github-actions in #5956
  • chore(deps): update Maestro to v2.4.0 by github-actions in #5955
  • Feat: Fallback to stacktrace parsing by lucas-zimerman in #5946
  • fix(ci): Bump Node to 22 in size-analysis and testflight workflows by antonis in #5954
  • feat(playground): Open Sentry in desktop browser from Expo apps by antonis in #5947
  • chore(core): Bump sample app to React Native 0.84.1 by antonis in #5941
  • Size analysis for React Native SDK by alwx in #5949
  • chore(deps): bump lodash from 4.17.23 to 4.18.1 by dependabot in #5953
  • chore(deps): bump yauzl to ^3.2.1 by antonis in #5950
  • chore(deps): bump brace-expansion to ^2.0.3 by antonis in #5951
  • chore(deps): bump @xmldom/xmldom to fix XML injection by antonis in #5952

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Apr 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 c90b30d

Comment threadCHANGELOG.md Outdated
@antonis
antonis marked this pull request as ready for review April 7, 2026 09:10
@sentry

sentryBot commented Apr 7, 2026

Copy link
Copy Markdown

Sentry Build Distribution

App NameApp IDVersionConfigurationInstall Page
Sentry RNio.sentry.reactnative.sample8.7.0 (82)ReleaseInstall Build

@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!

@lucas-zimermanlucas-zimerman added the ready-to-merge Triggers the full CI test suite label Apr 7, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time417.30 ms452.14 ms34.84 ms
Size43.75 MiB48.08 MiB4.33 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
5c1e987+dirty423.52 ms471.64 ms48.12 ms
df5d108+dirty527.06 ms603.58 ms76.52 ms
a50b33d+dirty500.81 ms532.11 ms31.30 ms
4953e94+dirty442.02 ms456.52 ms14.50 ms
3817909+dirty406.67 ms416.58 ms9.91 ms

App size

RevisionPlainWith SentryDiff
5c1e987+dirty43.75 MiB48.08 MiB4.33 MiB
df5d108+dirty43.75 MiB48.08 MiB4.33 MiB
a50b33d+dirty43.75 MiB48.08 MiB4.33 MiB
4953e94+dirty43.75 MiB48.08 MiB4.33 MiB
3817909+dirty43.75 MiB48.08 MiB4.33 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1226.19 ms1228.04 ms1.85 ms
Size3.38 MiB4.74 MiB1.35 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
a50b33d+dirty1197.74 ms1197.17 ms-0.57 ms
4953e94+dirty1212.06 ms1214.83 ms2.77 ms
df5d108+dirty1225.90 ms1220.14 ms-5.76 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
3817909+dirty1183.90 ms1187.50 ms3.60 ms

App size

RevisionPlainWith SentryDiff
a50b33d+dirty3.38 MiB4.73 MiB1.35 MiB
4953e94+dirty3.38 MiB4.73 MiB1.35 MiB
df5d108+dirty3.38 MiB4.73 MiB1.35 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
3817909+dirty3.38 MiB4.73 MiB1.35 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1190.08 ms1192.26 ms2.17 ms
Size3.38 MiB4.74 MiB1.35 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
a50b33d+dirty1207.11 ms1212.10 ms5.00 ms
4953e94+dirty1217.41 ms1223.53 ms6.12 ms
df5d108+dirty1207.34 ms1210.50 ms3.16 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
3817909+dirty1210.76 ms1215.64 ms4.89 ms

App size

RevisionPlainWith SentryDiff
a50b33d+dirty3.38 MiB4.73 MiB1.35 MiB
4953e94+dirty3.38 MiB4.73 MiB1.35 MiB
df5d108+dirty3.38 MiB4.73 MiB1.35 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
3817909+dirty3.38 MiB4.73 MiB1.35 MiB

@antonis
antonis merged commit 6cc2aa7 into mainApr 7, 2026
100 of 109 checks passed
@antonis
antonis deleted the antonis/feat/attach-all-threads branch April 7, 2026 12:15
github-actionsBot added a commit to getsentry/sentry-for-ai that referenced this pull request Apr 9, 2026
…or recent SDK changes
- sentry-cocoa-sdk: add strictTraceContinuation and orgId config options (getsentry/sentry-cocoa#7705)
- sentry-php-sdk: add metric_flush_threshold config option for auto-flushing metrics (getsentry/sentry-php#2059)
- sentry-react-native-sdk: add attachAllThreads iOS option and Sentry.appLoaded() API (getsentry/sentry-react-native#5960, #5940)
- sentry-react-sdk: export sentryOnError for react-router v7 onError handler (getsentry/sentry-javascript#20120)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HazAT pushed a commit to getsentry/sentry-for-ai that referenced this pull request Apr 15, 2026
…or recent SDK changes (#95)
- sentry-cocoa-sdk: add strictTraceContinuation and orgId config options (getsentry/sentry-cocoa#7705)
- sentry-php-sdk: add metric_flush_threshold config option for auto-flushing metrics (getsentry/sentry-php#2059)
- sentry-react-native-sdk: add attachAllThreads iOS option and Sentry.appLoaded() API (getsentry/sentry-react-native#5960, #5940)
- sentry-react-sdk: export sentryOnError for react-router v7 onError handler (getsentry/sentry-javascript#20120)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
antonis added a commit to getsentry/sentry-docs that referenced this pull request Apr 16, 2026
## DESCRIBE YOUR PR
Documents the new `attachAllThreads` option for React Native on iOS,
which attaches full stack traces for all threads to captured events.
Added in the Hybrid SDK Options section alongside the existing
`attachThreads` (Android) option.
Ref: getsentry/sentry-react-native#5959
SDK PR: getsentry/sentry-react-native#5960
## 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#5960 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)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sentrivana pushed a commit to getsentry/sentry-docs that referenced this pull request May 18, 2026
## DESCRIBE YOUR PR
Documents the new `attachAllThreads` option for React Native on iOS,
which attaches full stack traces for all threads to captured events.
Added in the Hybrid SDK Options section alongside the existing
`attachThreads` (Android) option.
Ref: getsentry/sentry-react-native#5959
SDK PR: getsentry/sentry-react-native#5960
## 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#5960 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)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <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.

feat: Expose attachAllThreads option from Cocoa SDK

2 participants

@antonis@lucas-zimerman