Releases: getsentry/sentry-react-native
Releases · getsentry/sentry-react-native
8.9.1
Features
- Add new
@sentry/expo-upload-sourcemapspackage for uploading JavaScript bundles and source maps from Expo builds to Sentry (#6027)- The existing
sentry-expo-upload-sourcemapsbin bundled with@sentry/react-nativeis superseded by the new package; it continues to work unchanged for now
- The existing
- Expose scope-level attributes API (
setAttribute,setAttributes,removeAttribute) bridging to native SDKs (#6009) - Expose screenshot masking options (
screenshot.maskAllText,screenshot.maskAllImages,screenshot.maskedViewClasses,screenshot.unmaskedViewClasses) for error screenshots (#6007) - Warn Expo users at Metro startup when prebuilt native projects are missing Sentry configuration (#5984)
- Re-export AI SDK manual instrumentation helpers (
instrumentOpenAiClient,instrumentAnthropicAiClient,instrumentGoogleGenAIClient,createLangChainCallbackHandler,instrumentLangGraph,instrumentStateGraphCompile) for use in React Native apps (#6028) - Add
Sentry.GlobalErrorBoundarycomponent (andwithGlobalErrorBoundaryHOC) that renders a fallback UI for fatal non-rendering JS errors routed throughErrorUtilsin addition to the render-phase errors caught bySentry.ErrorBoundary. Opt-in flagsincludeNonFatalGlobalErrorsandincludeUnhandledRejectionsextend the fallback to non-fatal errors and unhandled promise rejections respectively. (#6023)
Fixes
- Fix
@sentry/expo-upload-sourcemapspublishing issue (#6037) - Fix iOS UI profiling options being silently ignored (#6012)
- Fix
_experiments.enableUnhandledCPPExceptionsV2being silently ignored on iOS (#6014) - Check
captureReplayreturn value in iOS bridge to avoid linking error events to uncaptured replays (#6008) - Report the expected properties file path and any missing keys when using
flavorAwareon Android, instead of failing with an opaqueIllegal null value provided in this collectionerror (#6031)
Dependencies
8.9.0
Warning
This release has a broken workspace-protocol dependency and cannot be installed; use 8.9.1
Features
- Add new
@sentry/expo-upload-sourcemapspackage for uploading JavaScript bundles and source maps from Expo builds to Sentry (#6027)- The existing
sentry-expo-upload-sourcemapsbin bundled with@sentry/react-nativeis superseded by the new package; it continues to work unchanged for now
- The existing
- Expose scope-level attributes API (
setAttribute,setAttributes,removeAttribute) bridging to native SDKs (#6009) - Expose screenshot masking options (
screenshot.maskAllText,screenshot.maskAllImages,screenshot.maskedViewClasses,screenshot.unmaskedViewClasses) for error screenshots (#6007) - Warn Expo users at Metro startup when prebuilt native projects are missing Sentry configuration (#5984)
- Re-export AI SDK manual instrumentation helpers (
instrumentOpenAiClient,instrumentAnthropicAiClient,instrumentGoogleGenAIClient,createLangChainCallbackHandler,instrumentLangGraph,instrumentStateGraphCompile) for use in React Native apps (#6028) - Add
Sentry.GlobalErrorBoundarycomponent (andwithGlobalErrorBoundaryHOC) that renders a fallback UI for fatal non-rendering JS errors routed throughErrorUtilsin addition to the render-phase errors caught bySentry.ErrorBoundary. Opt-in flagsincludeNonFatalGlobalErrorsandincludeUnhandledRejectionsextend the fallback to non-fatal errors and unhandled promise rejections respectively. (#6023)
Fixes
- Fix iOS UI profiling options being silently ignored (#6012)
- Fix
_experiments.enableUnhandledCPPExceptionsV2being silently ignored on iOS (#6014) - Check
captureReplayreturn value in iOS bridge to avoid linking error events to uncaptured replays (#6008) - Report the expected properties file path and any missing keys when using
flavorAwareon Android, instead of failing with an opaqueIllegal null value provided in this collectionerror (#6031)
Dependencies
8.8.0
Features
- Enable "Open Sentry" button in Playground for Expo apps (#5947)
- Add
attachAllThreadsoption to attach full stack traces for all threads to captured events on iOS (#5960) - Add
strictTraceContinuationandorgIdoptions for trace continuation validation (#5829) - Add
deeplinkIntegrationfor automatic deep link breadcrumbs (#5983) - Name navigation spans using dispatched action payload when
useDispatchedActionDatais enabled (#5982)
Fixes
- Fix sourcemap upload script failing when
withSentryis used programmatically inapp.config.ts(#6006) - Retry native module resolution to prevent silent event drops in production Hermes builds (#5981)
- Lazy-load Metro internal modules to prevent Expo 55 import errors (#5958)
- Fix app start transaction profile offset by using the actual profiling start timestamp instead of the adjusted app start time (#5962)
- Use React
componentStackas fallback when error has no stack trace on Android (#5965) - Add
SENTRY_PROJECT_ROOTenv var to override project root in Xcode build phase scripts for monorepo setups (#5961)
Dependencies
8.7.0
Features
- Add
Sentry.appLoaded()API to explicitly signal app start end (#5940) - Add
frames.delayspan data from native SDKs to app start, TTID/TTFD, and JS API spans (#5907) - Rename
FeedbackWidgettoFeedbackFormandshowFeedbackWidgettoshowFeedbackForm(#5931)- The old names are deprecated but still work
- Deprecate
FeedbackButton,showFeedbackButton, andhideFeedbackButton(#5933)
Fixes
- Fix inflated
http.clientspan durations on iOS when the app backgrounds during a request (#5944) - Fix crash caused by nullish response in supabase PostgREST handler (#5938)
- Fix iOS crash (EXC_BAD_ACCESS) in time-to-initial-display when navigating between screens (#5887)
Dependencies
8.6.0
Fixes
- Session replay will no longer start recording when an event was ignored or dropped. (#5885)
- Capture native exceptions consumed by Expo's bridgeless error handling on Android (#5871)
- Fix SIGABRT crash on launch when
mobileReplayIntegrationis not configured and iOS deployment target >= 16.0 (#5858) - Reduce
reactNavigationIntegrationperformance overhead (#5840, #5842, #5849) - Fix duplicated breadcrumbs on Android (#5841)
Dependencies
8.5.0
Features
- Support
SENTRY_ENVIRONMENTin bare React Native builds (#5823) - Add
expoUpdatesListenerIntegrationthat records breadcrumbs for Expo Updates lifecycle events (#5795)- Tracks update checks, downloads, errors, rollbacks, and restarts as
expo.updatesbreadcrumbs - Enabled by default in Expo apps (requires
expo-updatesto be installed)
- Tracks update checks, downloads, errors, rollbacks, and restarts as
- feat(android): Expose
enableAnrFingerprintingoption (#5838) - Show feedback widget on device shake (#5754)
- Use
Sentry.enableFeedbackOnShake()/Sentry.disableFeedbackOnShake()or setfeedbackIntegration({ enableShakeToReport: true })
- Use
Fixes
- Fix native frames measurements being dropped due to race condition (#5813)
- Fix app start data lost when first navigation transaction is discarded (#5833)
Dependencies
8.4.0
Fixes
- Pass
screenshotStrategyoption frommobileReplayIntegrationto the Android native SDK (#5808)
Features
- Add
wrapExpoImageandwrapExpoAssetfor Expo performance monitoring (#5427)wrapExpoImageinstrumentsImage.prefetchandImage.loadAsyncfromexpo-imagewrapExpoAssetinstrumentsAsset.loadAsyncfromexpo-asset
import { Image } from 'expo-image'; import { Asset } from 'expo-asset'; import * as Sentry from '@sentry/react-native'; Sentry.wrapExpoImage(Image); Sentry.wrapExpoAsset(Asset);
- Adds tags with Expo Updates context variables to make them searchable and filterable (#5788)
- Automatically capture a warning event when Expo Updates performs an emergency launch (#5794)
- Adds environment configuration in the Expo config plugin. This can be set with the
SENTRY_ENVIRONMENTenv variable or insentry.options.json(#5796)["@sentry/react-native/expo", { "useNativeInit": true, "options": { "environment": "staging" } }]
- Generate
sentry.options.jsonfrom the Expo config pluginoptionsproperty (#5804)["@sentry/react-native/expo", { "useNativeInit": true, "options": { "dsn": "https://key@sentry.io/123", "tracesSampleRate": 1.0 } }]
Fixes
- Defer initial navigation span creation until navigation container is registered (#5789)
- Exclude server-only AI/MCP modules from native bundles, reducing bundle size by ~150kb (#5802)
Dependencies
8.3.0
Features
- Add
onNativeLogcallback to intercept and forward native SDK logs to JavaScript console (#5622)- The callback receives native log events with
level,component, andmessageproperties - Only works when
debug: trueis enabled inSentry.init - Use
consoleSandboxinside the callback to prevent feedback loops with Sentry's console integrationimport * as Sentry from '@sentry/react-native'; Sentry.init({ debug: true, onNativeLog: ({ level, component, message }) => { // Use consoleSandbox to avoid feedback loops Sentry.consoleSandbox(() => { console.log( `[Sentry Native] [${level.toUpperCase()}] [${component}] ${message}` ); }); } });
- The callback receives native log events with
- Add expo constants on event context (#5748)
- Capture dynamic route params as span attributes for Expo Router navigations (#5750)
- EAS Build Hooks (#5666)
- Capture EAS build events in Sentry. Add the following to your
package.json:Set{ "scripts": { "eas-build-on-complete": "sentry-eas-build-on-complete" } }SENTRY_DSNin your EAS secrets, and optionallySENTRY_EAS_BUILD_CAPTURE_SUCCESS=trueto also capture successful builds.
- Capture EAS build events in Sentry. Add the following to your
Fixes
- App start data not attached to sampled transactions when preceded by unsampled transactions (#5756)
- Resolve relative
SOURCEMAP_FILEpaths against the project root in the Xcode build script (#5730) - Fixes the issue with unit mismatch in
adjustTransactionDuration(#5740) - Handle
inactivestate for spans (#5742)
Dependencies
8.2.0 (Stable)
8.1.0
Features
- Add
enableTombstoneoption for improved native crash reporting on Android 12+ (#5680)- When enabled, uses Android's
ApplicationExitInfo.REASON_CRASH_NATIVEto capture native crashes with more detailed thread information
import * as Sentry from '@sentry/react-native'; Sentry.init({ dsn: 'YOUR_DSN', enableTombstone: true, });
- When enabled, uses Android's
- Expose iOS options to ignore views from subtree traversal in version 8 (#5663)
- 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 race condition where iOS dSYM upload runs before debug symbols are fully generated (#5653)