From f7bf0c3ee4c77043cea52e5b9240770423f13124 Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Tue, 13 Oct 2026 15:17:53 +0200 Subject: [PATCH 1/5] docs: Add React Native SDK Turbo Module changelog entry Co-Authored-By: Claude Opus 5.5 --- .../2026-10-react-native-turbo-modules.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 content/changelog/2026-10-react-native-turbo-modules.md diff --git a/content/changelog/2026-10-react-native-turbo-modules.md b/content/changelog/2026-10-react-native-turbo-modules.md new file mode 100644 index 0000000..97f9dad --- /dev/null +++ b/content/changelog/2026-10-react-native-turbo-modules.md @@ -0,0 +1,44 @@ +--- +title: "React Native SDK: Turbo Module insights" +slug: react-native-sdk-turbo-module-insights +summary: The React Native SDK now records the duration and errors of native module calls, and adds the active call to crash reports. +categories: + - SDK + - Performance +platform: + - react-native +broadcastCategory: sdk_update +published: true +date: 2026-10-13 +author: aleksandr.pantiukhov@sentry.io +--- + +Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. Starting with version [8.14.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.14.0), the Sentry React Native SDK records these calls. If you initialize the SDK with `enableNative` (the default), the `turboModuleContextIntegration` is active and needs no setup. + +## Crash context + +When your app crashes in native code, the crash report shows the Turbo Module method that was active at that time. The SDK adds the `turbo_module` context and the `turbo_module.name` and `turbo_module.method` tags to the event. + +## Performance data on spans + +When a transaction or a span ends, the SDK adds the call count, the duration, and the error count for each module and method. For example, a navigation span shows the native calls that occurred during the screen change. The summary attributes `turbo_module.total_call_count`, `turbo_module.total_duration_ms`, and `turbo_module.top_module` show the total cost. + +Asynchronous calls that take more than 500 ms add a `native.turbo_module` breadcrumb. Methods that use success and failure callbacks instead of a Promise get correct durations too. + +## Old Architecture support + +If your app uses the Old Architecture, you can get the same data for `NativeModules`. Use the `arch` field to tell the two sources apart: + +```js +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [ + Sentry.turboModuleContextIntegration({ + enableLegacyNativeModules: true, + slowCallThresholdMs: 500, + }), + ], +}); +``` + +For all options and changes, read the React Native SDK [changelog](https://github.com/getsentry/sentry-react-native/blob/main/CHANGELOG.md). To get all the improvements, upgrade to version [8.23.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.23.0) or later. From bc98ad4b07fb26ea1a202f3560a7d10a6cdb5eff Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Tue, 13 Oct 2026 15:41:36 +0200 Subject: [PATCH 2/5] docs: Add aggregated statistics to React Native Turbo Module entry Co-Authored-By: Claude Opus 5.5 --- .../changelog/2026-10-react-native-turbo-modules.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/changelog/2026-10-react-native-turbo-modules.md b/content/changelog/2026-10-react-native-turbo-modules.md index 97f9dad..ca2ee28 100644 --- a/content/changelog/2026-10-react-native-turbo-modules.md +++ b/content/changelog/2026-10-react-native-turbo-modules.md @@ -1,7 +1,7 @@ --- title: "React Native SDK: Turbo Module insights" slug: react-native-sdk-turbo-module-insights -summary: The React Native SDK now records the duration and errors of native module calls, and adds the active call to crash reports. +summary: The React Native SDK now records the calls, duration, and errors of native modules, and adds the active call to crash reports. categories: - SDK - Performance @@ -17,7 +17,13 @@ Turbo Modules are the native modules of the React Native New Architecture. Your ## Crash context -When your app crashes in native code, the crash report shows the Turbo Module method that was active at that time. The SDK adds the `turbo_module` context and the `turbo_module.name` and `turbo_module.method` tags to the event. +When your app crashes in native code, the crash report shows the Turbo Module method that was active at that time. The SDK adds the `turbo_module` context and the `turbo_module.name` and `turbo_module.method` tags to the event. Version 8.30.0 fixes stale tags on Android native crashes. + +## Aggregated statistics + +The SDK counts the calls, the errors, and the total duration for each module and method. When a transaction finishes, the SDK adds a `turbo_modules.aggregate` child span with the full breakdown. The root span gets the `turbo_modules.call_count`, `turbo_modules.error_count`, `turbo_modules.total_ms`, and `turbo_modules.top_module_ms` measurements. + +If your app runs for a long time without transactions, the SDK sends the statistics in an info-level event every 30 seconds. If there is no new data, the SDK does not send the event. Calls from the SDK itself (`RNSentry`) are not counted. ## Performance data on spans @@ -41,4 +47,4 @@ Sentry.init({ }); ``` -For all options and changes, read the React Native SDK [changelog](https://github.com/getsentry/sentry-react-native/blob/main/CHANGELOG.md). To get all the improvements, upgrade to version [8.23.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.23.0) or later. +For all options and changes, read the React Native SDK [changelog](https://github.com/getsentry/sentry-react-native/blob/main/CHANGELOG.md). To get all the improvements, upgrade to version [8.30.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.30.0) or later. From 8935d5db64e1366a7981882ae4c0a6f20548600d Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Tue, 13 Oct 2026 16:26:40 +0200 Subject: [PATCH 3/5] docs: Explain the modules option for New Architecture Turbo Modules Co-Authored-By: Claude Opus 5.5 --- .../2026-10-react-native-turbo-modules.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/content/changelog/2026-10-react-native-turbo-modules.md b/content/changelog/2026-10-react-native-turbo-modules.md index ca2ee28..a85b708 100644 --- a/content/changelog/2026-10-react-native-turbo-modules.md +++ b/content/changelog/2026-10-react-native-turbo-modules.md @@ -13,7 +13,20 @@ date: 2026-10-13 author: aleksandr.pantiukhov@sentry.io --- -Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. Starting with version [8.14.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.14.0), the Sentry React Native SDK records these calls. If you initialize the SDK with `enableNative` (the default), the `turboModuleContextIntegration` is active and needs no setup. +Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. Starting with version [8.14.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.14.0), the Sentry React Native SDK can record these calls. If you initialize the SDK with `enableNative` (the default), the `turboModuleContextIntegration` is active. By default, it records only the calls to the Sentry module. To record your own Turbo Modules, give them to the integration in the `modules` option: + +```js +import NativeCameraModule from "./specs/NativeCameraModule"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [ + Sentry.turboModuleContextIntegration({ + modules: [{ name: "NativeCameraModule", module: NativeCameraModule }], + }), + ], +}); +``` ## Crash context @@ -33,7 +46,7 @@ Asynchronous calls that take more than 500 ms add a `native.turbo_module` breadc ## Old Architecture support -If your app uses the Old Architecture, you can get the same data for `NativeModules`. Use the `arch` field to tell the two sources apart: +If your app uses the Old Architecture, the SDK can record all registered `NativeModules` automatically. You do not need the `modules` list for this. Use the `arch` field to tell the two sources apart: ```js Sentry.init({ From 15ef1c0f7590cf546bfe90571b71c0a8c854847a Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Tue, 13 Oct 2026 16:49:42 +0200 Subject: [PATCH 4/5] docs: Clarify that RNSentry calls give only crash context Co-Authored-By: Claude Opus 5.5 --- content/changelog/2026-10-react-native-turbo-modules.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/changelog/2026-10-react-native-turbo-modules.md b/content/changelog/2026-10-react-native-turbo-modules.md index a85b708..b4d6eae 100644 --- a/content/changelog/2026-10-react-native-turbo-modules.md +++ b/content/changelog/2026-10-react-native-turbo-modules.md @@ -13,7 +13,7 @@ date: 2026-10-13 author: aleksandr.pantiukhov@sentry.io --- -Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. Starting with version [8.14.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.14.0), the Sentry React Native SDK can record these calls. If you initialize the SDK with `enableNative` (the default), the `turboModuleContextIntegration` is active. By default, it records only the calls to the Sentry module. To record your own Turbo Modules, give them to the integration in the `modules` option: +Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. Starting with version [8.14.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.14.0), the Sentry React Native SDK can record these calls. If you initialize the SDK with `enableNative` (the default), the `turboModuleContextIntegration` is active. By default, it wraps only the Sentry module, and uses these calls only for crash context. To get statistics, span attributes, and breadcrumbs for your own Turbo Modules, give them to the integration in the `modules` option: ```js import NativeCameraModule from "./specs/NativeCameraModule"; @@ -36,11 +36,11 @@ When your app crashes in native code, the crash report shows the Turbo Module me The SDK counts the calls, the errors, and the total duration for each module and method. When a transaction finishes, the SDK adds a `turbo_modules.aggregate` child span with the full breakdown. The root span gets the `turbo_modules.call_count`, `turbo_modules.error_count`, `turbo_modules.total_ms`, and `turbo_modules.top_module_ms` measurements. -If your app runs for a long time without transactions, the SDK sends the statistics in an info-level event every 30 seconds. If there is no new data, the SDK does not send the event. Calls from the SDK itself (`RNSentry`) are not counted. +If your app runs for a long time without transactions, the SDK sends the statistics in an info-level event every 30 seconds. If there is no new data, the SDK does not send the event. ## Performance data on spans -When a transaction or a span ends, the SDK adds the call count, the duration, and the error count for each module and method. For example, a navigation span shows the native calls that occurred during the screen change. The summary attributes `turbo_module.total_call_count`, `turbo_module.total_duration_ms`, and `turbo_module.top_module` show the total cost. +When a root span ends, the SDK adds the call count, the duration, and the error count for each module and method. For example, a navigation span shows the native calls that occurred during the screen change. The summary attributes `turbo_module.total_call_count`, `turbo_module.total_duration_ms`, and `turbo_module.top_module` show the total cost. Asynchronous calls that take more than 500 ms add a `native.turbo_module` breadcrumb. Methods that use success and failure callbacks instead of a Promise get correct durations too. From 04643a7835e15a8ff9da2a2b56e0580e43de9ae4 Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Thu, 15 Oct 2026 12:05:47 +0200 Subject: [PATCH 5/5] docs: Link React Native Turbo Module entry to the docs page Co-Authored-By: Claude Opus 5.5 --- .../2026-10-react-native-turbo-modules.md | 44 +++++-------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/content/changelog/2026-10-react-native-turbo-modules.md b/content/changelog/2026-10-react-native-turbo-modules.md index b4d6eae..e4c7041 100644 --- a/content/changelog/2026-10-react-native-turbo-modules.md +++ b/content/changelog/2026-10-react-native-turbo-modules.md @@ -9,11 +9,17 @@ platform: - react-native broadcastCategory: sdk_update published: true -date: 2026-10-13 +date: 2026-10-15 author: aleksandr.pantiukhov@sentry.io --- -Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. Starting with version [8.14.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.14.0), the Sentry React Native SDK can record these calls. If you initialize the SDK with `enableNative` (the default), the `turboModuleContextIntegration` is active. By default, it wraps only the Sentry module, and uses these calls only for crash context. To get statistics, span attributes, and breadcrumbs for your own Turbo Modules, give them to the integration in the `modules` option: +Turbo Modules are the native modules of the React Native New Architecture. Your JavaScript code calls them to use the camera, storage, sensors, and other native features. The [TurboModule Context](https://docs.sentry.io/platforms/react-native/integrations/turbo-module-context/) integration of the Sentry React Native SDK records these calls and gives you this data: + +- For native crashes, the module and method that were active at the time of the crash +- Call counts, error counts, and durations for each module and method, on transactions and root spans +- Breadcrumbs for slow asynchronous calls + +The integration is enabled by default, but it wraps only the Sentry module. To get data about your own Turbo Modules, give them to the integration in the `modules` option: ```js import NativeCameraModule from "./specs/NativeCameraModule"; @@ -28,36 +34,6 @@ Sentry.init({ }); ``` -## Crash context - -When your app crashes in native code, the crash report shows the Turbo Module method that was active at that time. The SDK adds the `turbo_module` context and the `turbo_module.name` and `turbo_module.method` tags to the event. Version 8.30.0 fixes stale tags on Android native crashes. - -## Aggregated statistics - -The SDK counts the calls, the errors, and the total duration for each module and method. When a transaction finishes, the SDK adds a `turbo_modules.aggregate` child span with the full breakdown. The root span gets the `turbo_modules.call_count`, `turbo_modules.error_count`, `turbo_modules.total_ms`, and `turbo_modules.top_module_ms` measurements. - -If your app runs for a long time without transactions, the SDK sends the statistics in an info-level event every 30 seconds. If there is no new data, the SDK does not send the event. - -## Performance data on spans - -When a root span ends, the SDK adds the call count, the duration, and the error count for each module and method. For example, a navigation span shows the native calls that occurred during the screen change. The summary attributes `turbo_module.total_call_count`, `turbo_module.total_duration_ms`, and `turbo_module.top_module` show the total cost. - -Asynchronous calls that take more than 500 ms add a `native.turbo_module` breadcrumb. Methods that use success and failure callbacks instead of a Promise get correct durations too. - -## Old Architecture support - -If your app uses the Old Architecture, the SDK can record all registered `NativeModules` automatically. You do not need the `modules` list for this. Use the `arch` field to tell the two sources apart: - -```js -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - Sentry.turboModuleContextIntegration({ - enableLegacyNativeModules: true, - slowCallThresholdMs: 500, - }), - ], -}); -``` +If your app uses the Old Architecture, set `enableLegacyNativeModules: true` to record all registered `NativeModules` automatically. -For all options and changes, read the React Native SDK [changelog](https://github.com/getsentry/sentry-react-native/blob/main/CHANGELOG.md). To get all the improvements, upgrade to version [8.30.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.30.0) or later. +To get all the improvements, upgrade to version [8.30.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.30.0) or later. For all options and the data that the integration sends, read the [TurboModule Context](https://docs.sentry.io/platforms/react-native/integrations/turbo-module-context/) documentation.