Releases: getsentry/sentry-react-native
Releases Β· getsentry/sentry-react-native
8.0.0-alpha.0
Upgrading from 7.x to 8.0
Version 8 of the Sentry React Native SDK updates the underlying native SDKs (Cocoa v9, CLI v3, Android Gradle Plugin v6) which introduce breaking changes in minimum version requirements and build tooling.
See our migration docs for more information.
Breaking Changes
Minimum Version Requirements
-
iOS/macOS/tvOS: (#5356)
- iOS 15.0+ (previously 11.0+)
- macOS 10.14+ (previously 10.13+)
- tvOS 15.0+ (previously 11.0+)
-
Android: (#5578)
- Sentry Android Gradle Plugin 6.0.0 (previously 5.x)
- Android Gradle Plugin 7.4.0+ (previously 7.3.0+)
- Kotlin 1.8+
-
Sentry Self-Hosted: (#5523)
- Sentry CLI v3 requires self-hosted 25.11.1+ (previously 25.2.0)
Features
-
Capture App Start errors and crashes by initializing Sentry from
sentry.options.json(#4472)Create
sentry.options.jsonin the React Native project root and set options the same as you currently have inSentry.initin JS.{ "dsn": "https://[email protected]/value", }Initialize Sentry on the native layers by newly provided native methods.
import io.sentry.react.RNSentrySDK class MainApplication : Application(), ReactApplication { override fun onCreate() { super.onCreate() RNSentrySDK.init(this) } }
#import <RNSentry/RNSentry.h> @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [RNSentrySDK start]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } @end
-
Add RNSentrySDK APIs support to @sentry/react-native/expo plugin (#4633)
- Adds
useNativeInitoption to automatically initialize Sentry natively before JavaScript loads, enabling capture of app start errors
{ "expo": { "plugins": [ [ "@sentry/react-native/expo", { "useNativeInit": true } ] ] } } - Adds
Changes
- Load
optionsFileinto the JS bundle during Metro bundle process (#4476) - Add experimental version of
startWithConfigureOptionsfor Apple platforms (#4444) - Add experimental version of
initwith optionalOptionsConfiguration<SentryAndroidOptions>for Android (#4451) - Add initialization using
sentry.options.jsonfor Apple platforms (#4447) - Add initialization using
sentry.options.jsonfor Android (#4451) - Merge options from file with
Sentry.initoptions in JS (#4510)
Internal
- Extract iOS native initialization to standalone structures (#4442)
- Extract Android native initialization to standalone structures (#4445)
Dependencies
7.11.0
Features
- Add support for applying scope attributes to JS logs (#5579)
- Add experimental
sentry-span-attributesprop to attach custom attributes to user interaction spans (#5569)<Pressable sentry-label="checkout" sentry-span-attributes={{ 'user.type': 'premium', 'cart.value': 150 }} onPress={handleCheckout}> <Text>Checkout</Text> </Pressable>
Dependencies
7.10.0
7.9.0
Features
- Experimental support of UI profiling on Android (#5518)
- Expose iOS options to ignore views from subtree traversal (#5545)
- Use
includedViewClassesto only traverse specific view classes, orexcludedViewClassesto skip problematic view classes during session replay and screenshot capture
import * as Sentry from '@sentry/react-native'; Sentry.init({ replaysSessionSampleRate: 1.0, integrations: [ Sentry.mobileReplayIntegration({ includedViewClasses: ['UILabel', 'UIView', 'MyCustomView'], excludedViewClasses: ['WKWebView', 'UIWebView'], }), ], });
- Use
Fixes
- Fix duplicate error reporting on iOS with New Architecture (#5532)
- Fix for missing
replay_idfrom metrics (#5483) - Skip span ID check when standalone mode is enabled (#5493)
- Fix traces not always being attached to replays with errors (#5538)
Dependencies
7.8.0 (Stable)
Features
- Adds Metrics Beta (#5402)
- Improves Expo Router integration to optionally include full paths to components instead of just component names (#5414)
- Report slow and frozen frames as TTID/TTFD span data (#5419)
- Report slow and frozen frames on spans created through the API (#5420)
- Improve performance by adding caching to
getReplayId(#5449)
Fixes
- Fix
Object.freezetype pollution from@sentry-internal/replay(#5408)
Dependencies
7.7.0 (Stable)
Features
- Added
logsOriginto Sentry Options (#5354)- You can now choose which logs are captured: 'native' for logs from native code only, 'js' for logs from the JavaScript layer only, or 'all' for both layers.
- Takes effect only if
enableLogsistrueand defaults to 'all', preserving previous behavior.
- Add
beforeErrorSamplingcallback tomobileReplayIntegration(#5393)
Fixes
- Preserves interaction span context during app restart to allow proper replay capture (#5386)
- Discard empty Route Change transactions (#5387)
Dependencies
- Bump JavaScript SDK from v10.24.0 to v10.26.0 (#5362, #5389)
- Bump CLI from v2.58.0 to v2.58.2 (#5363, #5371)
- Bump Android SDK from v8.25.0 to v8.27.0 (#5364, #5395)
- Bump Android SDK Stubs from v8.25.0 to v8.27.0 (#5365, #5396)
- Bump Cocoa SDK from v8.57.2 to v8.57.3 (#5375)
- Bump Bundler Plugins from v4.6.0 to v4.6.1 (#5394)
7.6.0
7.5.0
Features
- Adds GraphQL integration (#5299)
- Adds Supabase integration (#5296)
- Add new experimental Canvas Capture Strategy for Session Replay (#5301)
- A new screenshot capture strategy that uses Android's Canvas API for more accurate and reliable text and image masking
- Any
.drawText()or.drawBitmap()calls are replaced by rectangles, ensuring no text or images are present in the resulting output - Note: If this strategy is used, all text and images will be masked, regardless of any masking configuration
- To enable this feature, set the
screenshotStrategytocanvas:import * as Sentry from '@sentry/react-native'; Sentry.init({ integrations: [ Sentry.mobileReplayIntegration({ screenshotStrategy: 'canvas', }), ], });
Fixes
- Fixes orientation change misalignment for session replay on Android (#5321)
- Sync
user.geofromSetUserto the native layer (#5302)
Dependencies
- Bump Bundler Plugins from v4.4.0 to v4.6.0 (#5283, #5314)
- Bump JavaScript SDK from v10.20.0 to v10.22.0 (#5289, #5306)
- Bump CLI from v2.56.1 to v2.57.0 (#5295)
- Bump Android SDK from v8.23.0 to v8.25.0 (#5292, #5318)
- Bump Android SDK Stubs from v8.23.0 to v8.25.0 (#5293, #5319)
- Bump Cocoa SDK from v8.57.0 to v8.57.1 (#5320)
7.4.0 (Stable)
Features
Fixes
- Fix compatibility with
react-native-legal(#5253)- The licenses json file is correctly generated and placed into the
res/folder now
- The licenses json file is correctly generated and placed into the
- Handle missing shouldAddToIgnoreList callback in Metro (#5260)
- Overrides the default Cocoa SDK behavior that disables Session Replay on iOS 26.0 (#5268)
- If you are using Apple's Liquid Glass we recommend that you disable Session Replay on iOS to prevent potential PII leaks (see sentry-cocoa 8.57.0 release note warning)
Dependencies
7.3.0
Features
- Adds support for Gradle 9 (#5233)
Fixes
- Updates
sentry-xcode.shand the default settings for theproject.pbxprojto fix the issue with escape patterns in Xcode that leaded to errors during "Bundle React Native code and images" stage (#5221) - Fixes .env file loading in Expo sourcemap uploads (#5210)
- Fixes the issue with changing immutable metadata structure in the contructor of
ReactNativeClient. This structure is getting re-created instead of being modified to ensure IP address is only inferred by Relay ifsendDefaultPiiistrue(#5202) - Removes usage of deprecated
SafeAreaView(#5241) - Fixes session replay recording for uncaught errors (#5243)
- Fixes TypeScript errors when using custom Metro configurations with Expo SDK 54 (#5246)