npm @sentry/react-native 8.3.0

7 hours ago

Features

  • Add onNativeLog callback to intercept and forward native SDK logs to JavaScript console (#5622)
    • The callback receives native log events with level, component, and message properties
    • Only works when debug: true is enabled in Sentry.init
    • Use consoleSandbox inside the callback to prevent feedback loops with Sentry's console integration
      import * 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}`
            );
          });
        }
      });
  • 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:
      {
        "scripts": {
          "eas-build-on-complete": "sentry-eas-build-on-complete"
        }
      }
      Set SENTRY_DSN in your EAS secrets, and optionally SENTRY_EAS_BUILD_CAPTURE_SUCCESS=true to also capture successful builds.

Fixes

  • App start data not attached to sampled transactions when preceded by unsampled transactions (#5756)
  • Resolve relative SOURCEMAP_FILE paths against the project root in the Xcode build script (#5730)
  • Fixes the issue with unit mismatch in adjustTransactionDuration (#5740)
  • Handle inactive state for spans (#5742)

Dependencies

Don't miss a new react-native release

NewReleases is sending notifications on new releases.