From fc1ba86bd69f7b12438dec1c387faba72ea9fbfe Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 7 Apr 2026 10:58:56 +0200 Subject: [PATCH 1/2] feat(ios): Add `attachAllThreads` option 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) --- CHANGELOG.md | 1 + packages/core/src/js/options.ts | 8 ++++++++ packages/core/test/wrapper.test.ts | 17 +++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6418b28f9a..01b4ce20c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Features - Enable "Open Sentry" button in Playground for Expo apps ([#5947](https://github.com/getsentry/sentry-react-native/pull/5947)) +- Add `attachAllThreads` option to attach full stack traces for all threads to captured events on iOS ([#5959](https://github.com/getsentry/sentry-react-native/issues/5959)) ### Dependencies diff --git a/packages/core/src/js/options.ts b/packages/core/src/js/options.ts index 61df5a3242..abe769069b 100644 --- a/packages/core/src/js/options.ts +++ b/packages/core/src/js/options.ts @@ -96,6 +96,14 @@ export interface BaseReactNativeOptions { */ attachThreads?: boolean; + /** + * When enabled, full stack traces for all threads are attached to all captured events. + * + * @default false + * @platform ios + */ + attachAllThreads?: boolean; + /** * When enabled, certain personally identifiable information (PII) is added by active integrations. * diff --git a/packages/core/test/wrapper.test.ts b/packages/core/test/wrapper.test.ts index 5762929a4e..0a546bb17b 100644 --- a/packages/core/test/wrapper.test.ts +++ b/packages/core/test/wrapper.test.ts @@ -224,6 +224,23 @@ describe('Tests Native Wrapper', () => { expect(NATIVE.enableNative).toBe(true); }); + test('passes attachAllThreads to native SDK', async () => { + await NATIVE.initNativeSdk({ + dsn: 'test', + enableNative: true, + autoInitializeNativeSdk: true, + attachAllThreads: true, + devServerUrl: undefined, + defaultSidecarUrl: undefined, + mobileReplayOptions: undefined, + }); + + expect(RNSentry.initNativeSdk).toHaveBeenCalled(); + // @ts-expect-error mock value + const initParameter = RNSentry.initNativeSdk.mock.calls[0][0]; + expect(initParameter).toHaveProperty('attachAllThreads', true); + }); + test('filter integrations when initializing Native SDK', async () => { await NATIVE.initNativeSdk({ dsn: 'test', From c90b30d8719e551fc0a492c363c57f19dd444e51 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 7 Apr 2026 11:02:13 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01b4ce20c7..98d153d9c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ ### Features - Enable "Open Sentry" button in Playground for Expo apps ([#5947](https://github.com/getsentry/sentry-react-native/pull/5947)) -- Add `attachAllThreads` option to attach full stack traces for all threads to captured events on iOS ([#5959](https://github.com/getsentry/sentry-react-native/issues/5959)) +- Add `attachAllThreads` option to attach full stack traces for all threads to captured events on iOS ([#5960](https://github.com/getsentry/sentry-react-native/issues/5960)) ### Dependencies