Releases: getsentry/sentry-react-native
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
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)
Dependencies
6.22.0
7.2.0
7.1.0 (Stable)
Fixes
-
Session Replay: Allow excluding
sentry-android-replayfrom android targets (#5174)- If you are not interested in using Session Replay, you can exclude the
sentry-android-replaymodule from your Android targets as follows (saves nearly 40KB compressed and 80KB uncompressed off the bundle size):
// from the android's root build.gradle file subprojects { configurations.all { exclude group: 'io.sentry', module: 'sentry-android-replay' } }
- If you are not interested in using Session Replay, you can exclude the
Dependencies
7.0.1
Important Changes
This release includes a fix for a behaviour change
that was originally fixed on version 6.21.0 of the React Native SDK: User IP Addresses should only be added to Sentry events automatically,
if sendDefaultPii was set to true.
To avoid making a major bump, the fix was patched on the current version and not by bumping to V8.
There is no API breakage involved and hence it is safe to update.
However, after updating the SDK, events (errors, traces, replays, etc.) sent from the browser, will only include
user IP addresses, if you set sendDefaultPii: true in your Sentry.init options.
We apologize for any inconvenience caused!
Fixes
- Ensure IP address is only inferred by Relay if
sendDefaultPiiistrue(#5138)
Dependencies
7.0.0
Upgrading from 6.x to 7.0
Version 7 of the Sentry React Native SDK primarily introduces API cleanup and version support changes based on the Sentry Javascript SDK versions 9 and 10. This update contains behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling.
Version 7 of the SDK is compatible with Sentry self-hosted versions 25.2.0 or higher (up from 24.4.2 for v6). Lower versions may continue to work, but may not support all features.
See our migration docs for more information.
Major Changes
-
Ensure IP address is only inferred by Relay if
sendDefaultPiiistrue(#5111) -
Set
{{auto}}ifuser.ip_addressisundefinedandsendDefaultPii: true(#4466) -
Sentry.captureUserFeedbackremoved, useSentry.captureFeedbackinstead (#4855) -
Exceptions from
captureConsoleIntegrationare now marked as handled: true by default -
shutdownTimeoutmoved fromcoreto@sentry/react-native -
hasTracingEnabledwas renamed tohasSpansEnabled -
You can no longer drop spans or return null on
beforeSendSpanhook -
Tags formatting logic updated (#4965)
Here are the altered/unaltered types, make sure to update your UI filters and alerts.Unaltered: string, null, number, and undefined values remain unchanged.
Altered: Boolean values are now capitalized: true -> True, false -> False.
Removed types
- TransactionNamingScheme
- Request
- Scope (prefer using the Scope class)
Other removed items.
autoSessionTrackingfrom options.
To enable session tracking, ensure thatenableAutoSessionTrackingis enabled.enableTracing. Instead, settracesSampleRateto a value greater thanzerotoenable tracing,0to keep tracing integrations active without sampling, orundefinedto disable the performance integration.getCurrentHub(),Hub, andgetCurrentHubShim()spanIdfrom propagationcontext- metrics API
transactionContextfromsamplingContext@sentry/utilspackage, the exports were moved to@sentry/core- Standalone
Clientinterface & deprecateBaseClient
Changes
- Expose
featureFlagsIntegration(#4984) - Expose
loggerandconsoleLoggingIntegration(#4930) - Remove deprecated
appOwnershipconstant use in Expo Go detection (#4893) - Disable AppStart and NativeFrames in unsupported environments (web, Expo Go) (#4897)
- Use
Replayinterface forbrowserReplayIntegrationreturn type (#4858) - Allow using
browserReplayIntegrationwithoutisWebguard (#4858)- The integration returns noop in non-browser environments
- Use single
encodeUTF8implementation through the SDK (#4885) - Use global
TextEncoder(available with Hermes in React Native 0.74 or higher) to improve envelope encoding performance. (#4874) breadcrumbsIntegrationdisables React Native incompatible options automatically (#4886)- Fork
scopeif custom scope is passed tostartSpanManualorstartSpan - On React Native Web,
browserSessionIntegrationis added whenenableAutoSessionTrackingis set toTrue(#4732) - Change
Cold/Warm App Startspan description toCold/Warm Start(#4636)
Features
To enable it add the following code to your Sentry Options:
Sentry.init({
enableLogs: true,
});You can also filter the logs being collected by adding beforeSendLogs
Sentry.init({
enableLogs: true,
beforeSendLog: log => {
return log;
},
});- Automatically detect Release name and version for Expo Web (#4967)
Fixes
- Align span description with other platforms (#4636) by @krystofwoldrich
- Tags with symbol are now logged (#4965)
- IgnoreError now filters Native errors (#4948)
You can use strings to filter errors or RegEx for filtering with a pattern.
example:
ignoreErrors: [
'1234', // Will filter any error message that contains 1234.
'.*1234', // Will not filter as regex, instead will filter messages that contains '.*1234"
/.*1234/, // Regex will filter any error message that ends with 1234
/.*1234.*/ // Regex will filter any error message that contains 1234.
]- Expo Updates Context is passed to native after native init to be available for crashes (#4808)
- Expo Updates Context values should all be lowercase (#4809)
- Avoid duplicate network requests (fetch, xhr) by default (#4816)
traceFetchis disabled by default on mobile as RN uses a polyfill which will be traced bytraceXHR
Dependencies
6.21.0 (Stable)
Important Changes
- fix(browser): Ensure IP address is only inferred by Relay if
sendDefaultPiiistrue(#5092)
This release includes a fix for a behaviour change
that was originally introduced with v9 of the JavaScript SDK: User IP Addresses should only be added to Sentry events automatically,
if sendDefaultPii was set to true.
However, the change in v9 required further internal adjustment, which should have been included in v10 of the SDK.
To avoid making a major bump, the fix was patched on the current version and not by bumping to V10.
There is no API breakage involved and hence it is safe to update.
However, after updating the SDK, events (errors, traces, replays, etc.) sent from the browser, will only include
user IP addresses, if you set sendDefaultPii: true in your Sentry.init options.
We apologize for any inconvenience caused!
Fixes
- Fix Expo prebuild failed on cached builds (#5098)
- Remove the warning that used to indicate that Time To Initial Display and Time To Full Display are not supported (#5081)
Dependencies
7.0.0-rc.2
Important Changes
- Ensure IP address is only inferred by Relay if
sendDefaultPiiistrue(#5111)
This release includes a fix for a behaviour change
that was originally introduced with v9 of the JavaScript SDK included in v7.0.0-beta.0: User IP Addresses should only be added to Sentry events automatically,
if sendDefaultPii was set to true.
We apologize for any inconvenience caused!
Features
- Logs now contains more attributes like release, os and device information (#5032)