Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency @sentry/react-native to v6 #7256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 19, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@sentry/react-native 5.9.1 -> 6.0.0 age adoption passing confidence

Release Notes

getsentry/sentry-react-native (@​sentry/react-native)

v6.0.0

Compare Source

This is a new major version 6.0.0 of the Sentry React Native SDK.
To upgrade from the SDK version 5, please follow our migration guide.

Major Changes
  • React Native Tracing options were moved to the root options

    import * as Sentry from '@​sentry/react-native';
    
    Sentry.init({
      tracesSampleRate: 1.0,
      enableAppStartTracking: true, // default true
      enableNativeFramesTracking: true, // default true
      enableStallTracking: true, // default true
      enableUserInteractionTracing: true, // default false
      integrations: [
        Sentry.reactNativeTracingIntegration({
          beforeStartSpan: (startSpanOptions) => {
            startSpanOptions.name = 'New Name';
            return startSpanOptions;
          },
        }),
        Sentry.appStartIntegration({
          standalone: false, // default false
        }),
      ],
    });
  • New React Navigation Integration interface (#​4003)

    import * as Sentry from '@​sentry/react-native';
    import { NavigationContainer } from '@​react-navigation/native';
    
    const reactNavigationIntegration = Sentry.reactNavigationIntegration();
    
    Sentry.init({
      tracesSampleRate: 1.0,
      integrations: [reactNavigationIntegration],
    });
    
    function RootComponent() {
      const navigation = React.useRef(null);
    
      return <NavigationContainer ref={navigation}
        onReady={() => {
          reactNavigationIntegration.registerNavigationContainer(navigation);
        }}>
      </NavigationContainer>;
    }
  • Removed beforeNavigate use beforeStartSpan instead (#​3998)

    • beforeStartSpan is executed before the span start, compared to beforeNavigate which was executed before the navigation ended (after the span was created)
Other Changes
  • Add sentry.origin to SDK spans to indicated if spans are created by a part of the SDK or manually (#​4066)

  • Xcode Debug Files upload completes in foreground by default (#​4090)

  • Set parentSpanIsAlwaysRootSpan to true to make parent of network requests predictable (#​4084)

  • Remove deprecated enableSpotlight and spotlightSidecarUrl (#​4086)

  • tracePropagationTargets defaults to all targets on mobile and same origin on the web (#​4083)

  • Move _experiments.profilesSampleRate to profilesSampleRate root options object #​3851)

  • Native Frames uses spanId to attach frames replacing traceId (#​4030)

  • Removed deprecated ReactNativeTracing option idleTimeout use idleTimeoutMs instead (#​3998)

  • Removed deprecated ReactNativeTracing option maxTransactionDuration use finalTimeoutMs instead (#​3998)

  • New Native Frames Integration (#​3996)

  • New Stall Tracking Integration (#​3997)

  • New User Interaction Tracing Integration (#​3999)

  • New App Start Integration (#​3852)

    • By default app start spans are attached to the first created transaction.
    • Standalone mode creates single root span (transaction) including only app start data.
  • New React Native Navigation Integration interface (#​4003)

    import * as Sentry from '@&#8203;sentry/react-native';
    import { Navigation } from 'react-native-navigation';
    
    Sentry.init({
      tracesSampleRate: 1.0,
      integrations: [
        Sentry.reactNativeNavigationIntegration({ navigation: Navigation })
      ],
    });
Fixes
  • TimeToDisplay correctly warns about not supporting the new React Native architecture (#​4160)
  • Native Wrapper method setContext ensures only values convertible to NativeMap are passed (#​4168)
  • Native Wrapper method setExtra ensures only stringified values are passed (#​4168)
  • setContext('key', null) removes the key value also from platform context (#​4168)
  • Upload source maps for all splits on Android (not only the last found) (#​4125)
Dependencies
Dependencies

v5.34.0

Compare Source

Fixes

v5.33.2

Compare Source

Fixes
  • Emits Bridge log only in debug mode (#​4145)
  • Remove unused spanName from TimeToDisplayProps (#​4150)
Dependencies

v5.33.1

Compare Source

Internal

This is re-release of 5.33.0 with no changes to ensure that 5.33.1 is tagged as latest release on npmjs.com

v5.33.0

Compare Source

Features
  • Add an option to disable native (iOS and Android) profiling for the HermesProfiling integration (#​4094)

    To disable native profilers add the hermesProfilingIntegration.

    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      integrations: [
        Sentry.hermesProfilingIntegration({ platformProfilers: false }),
      ],
    });

v5.32.0

Compare Source

Features
  • Exclude Sentry Web Replay by default, reducing the code in 130KB. (#​4006)

    • You can keep Sentry Web Replay by setting includeWebReplay to true in your metro config as shown in the snippet:
    // For Expo
    const { getSentryExpoConfig } = require("@&#8203;sentry/react-native/metro");
    const config = getSentryExpoConfig(__dirname, { includeWebReplay: true });
    
    // For RN
    const { getDefaultConfig } = require('@&#8203;react-native/metro-config');
    const { withSentryConfig } = require('@&#8203;sentry/react-native/metro');
    module.exports = withSentryConfig(getDefaultConfig(__dirname), { includeWebReplay: true });
Changes
  • Add Android Logger when new frame event is not emitted (#​4081)
  • React Native Tracing Deprecations (#​4073)
    • new ReactNativeTracing to reactNativeTracingIntegration()
    • new ReactNavigationInstrumentation to reactNavigationIntegration().
    • new ReactNativeNavigationInstrumentation to reactNativeNavigationIntegration().
    • ReactNavigationV4Instrumentation won't be supported in the next major SDK version, upgrade to react-navigation@5 or newer.
    • RoutingInstrumentation and RoutingInstrumentationInstance replace by Integration interface from @sentry/types.
    • enableAppStartTracking, enableNativeFramesTracking, enableStallTracking, enableUserInteractionTracing moved to Sentry.init({}) root options.
Dependencies

v5.31.1

Compare Source

Fixes
  • Sentry CLI passes thru recursive node calls during source maps auto upload from Xcode ((#​3843))
    • This fixes React Native 0.75 Xcode auto upload failures
Dependencies

v5.31.0

Compare Source

Features
  • Add Sentry.crashedLastRun() (#​4014)
Fixes
  • Use install_modules_dependencies for React iOS dependencies (#​4040)
  • Replay.maskAllText masks RCTParagraphComponentView (#​4048)
Dependencies

v5.30.0

Compare Source

Features
  • Add spotlight option (#​4023)
    • Deprecating enableSpotlight and spotlightSidecarUrl
Dependencies

v5.29.0

Compare Source

Features
  • TimeToInitialDisplay and TimeToFullDisplay start the time to display spans on mount (#​4020)
Fixes
  • fix(ttid): End and measure TTID regardless current active span (#​4019)
    • Fixes possible missing TTID measurements and spans
  • Fix crash when passing array as data to Sentry.addBreadcrumb({ data: [] }) (#​4021)
    • The expected data type is plain JS object, otherwise the data might be lost.
  • Fix requireNativeComponent missing in react-native-web (#​3958)
Dependencies

v5.28.0

Compare Source

Fixes
  • Support metro@0.80.10 new sourceMapString export (#​4004)
  • Sentry.captureMessage stack trace is in event.exception (moved from event.threads) (#​3635, #​3988)
    • To revert to the old behavior (causing the stack to be unsymbolicated) use useThreadsForMessageStack option
Dependencies

v5.27.0

Compare Source

Fixes
  • Pass sampleRate option to the Android SDK (#​3979)
  • Drop app start data older than one minute (#​3974)
  • Use Platform.constants.reactNativeVersion instead of react-native internal export (#​3949)
Dependencies

v5.26.0

Compare Source

Features
  • Session Replay Public Beta (#​3830)

    To enable Replay use the replaysSessionSampleRate or replaysOnErrorSampleRate options.

    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      _experiments: {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      },
    });

    To add React Component Names use annotateReactComponents in metro.config.js.

    // For Expo
    const { getSentryExpoConfig } = require("@&#8203;sentry/react-native/metro");
    const config = getSentryExpoConfig(__dirname, { annotateReactComponents: true });
    
    // For RN
    const { getDefaultConfig } = require('@&#8203;react-native/metro-config');
    const { withSentryConfig } = require('@&#8203;sentry/react-native/metro');
    module.exports = withSentryConfig(getDefaultConfig(__dirname), { annotateReactComponents: true });

    To change default redaction behavior add the mobileReplayIntegration.

    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      _experiments: {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      },
      integrations: [
        Sentry.mobileReplayIntegration({
          maskAllImages: true,
          maskAllVectors: true,
          maskAllText: true,
        }),
      ],
    });

    To learn more visit Sentry's Mobile Session Replay documentation page.

Dependencies

v5.25.0

Compare Source

Features
  • Improved Touch Event Breadcrumb components structure (#​3899)
  • Set currentScreen on native scope (#​3927)
Fixes
  • error.cause chain is locally symbolicated in development builds (#​3920)
  • sentry-expo-upload-sourcemaps no longer requires Sentry url when uploading sourcemaps to sentry.io (#​3915)
  • Flavor aware Android builds use SENTRY_AUTH_TOKEN env as fallback when token not found in sentry-flavor-type.properties. (#​3917)
  • mechanism.handled:false should crash current session (#​3900)
Dependencies

v5.24.3

Compare Source

Fixes
  • Support metro@0.80.10 new sourceMapString export (#​4004)
Dependencies

v5.24.2

Compare Source

Features
  • Add an option to disable native (iOS and Android) profiling for the HermesProfiling integration (#​4094)

    To disable native profilers add the hermesProfilingIntegration.

    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      integrations: [
        Sentry.hermesProfilingIntegration({ platformProfilers: false }),
      ],
    });

v5.24.1

Compare Source

Fixes
  • App Start Native Frames can start with zeroed values (#​3881)
Dependencies

v5.24.0

Compare Source

Features
  • Add native application start spans (#​3855, #​3884)
    • This doesn't change the app start measurement length, but add child spans (more detail) into the existing app start span
  • Added JS Bundle Execution start information to the application start measurements (#​3857)
Fixes
  • Add more expressive debug logs to Native Frames Integration (#​3880)
  • Add missing tracing integrations when using client.init() (#​3882)
  • Ensure sentry-cli doesn't trigger Xcode error: prefix (#​3887)
    • Fixes --allow-failure failing Xcode builds
Dependencies

v5.23.1

Compare Source

Fixes
  • Fix failing iOS builds due to missing SentryLevel (#​3854)
  • Add missing logs to dropped App Start spans (#​3861)
  • Make all options of startTimeToInitialDisplaySpan optional (#​3867)
  • Add Span IDs to Time to Display debug logs (#​3868)
  • Use TTID end timestamp when TTFD should be updated with an earlier timestamp (#​3869)

v5.23.0

Compare Source

This release does not build on iOS. Please use 5.23.1 or newer.

Features
  • Functional integrations (#​3814)

    Instead of installing @sentry/integrations and creating integrations using the new keyword, you can use direct imports of the functional integrations.

    // Before
    import * as Sentry from '@&#8203;sentry/react-native';
    import { HttpClient } from '@&#8203;sentry/integrations';
    
    Sentry.init({
      integrations: [
        new Sentry.BrowserIntegrations.Dedupe(),
        new Sentry.Integration.Screenshot(),
        new HttpClient(),
      ],
    });
    
    // After
    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      integrations: [
        Sentry.dedupeIntegration(),
        Sentry.screenshotIntegration(),
        Sentry.httpClientIntegration(),
      ],
    });

    Note that the Sentry.BrowserIntegrations, Sentry.Integration and the Class style integrations will be removed in the next major version of the SDK.

Fixes
Dependencies

v5.22.3

Compare Source

Fixes
  • Missing RNSentryOnDrawReporterView on iOS (#​3832)
Dependencies

v5.22.2

Compare Source

Fixes
  • Remove tunnel from SDK Options (#​3787)
  • Fix Apple non UIKit builds (#​3784)
Dependencies

v5.22.1

Compare Source

Dependencies

v5.22.0

Compare Source

Features
  • Updated metric normalization from @sentry/core (#​11519)
  • Metric rate limiting from sentry-cocoa and sentry-android
Dependencies

v5.21.0

Compare Source

Features
  • Add getDefaultConfig option to getSentryExpoConfig (#​3690)
  • Add beforeScreenshot option to ReactNativeOptions (#​3715)
Fixes
  • Do not enable NativeFramesTracking when native is not available (#​3705)
  • Do not initialize the SDK during expo-router static routes generation (#​3730)
  • Cancel spans in background doesn't crash in environments without AppState (#​3727)
  • Fix missing Stall measurements when using new .end() span API (#​3737)
  • Change TimeToDisplay unsupported log from error to warning level. (#​3699)
Dependencies

v5.20.0

Compare Source

Features
  • Automatic tracing of time to initial display for react-navigation (#​3588)

    When enabled the instrumentation will create TTID spans and measurements.
    The TTID timestamp represent moment when the react-navigation screen
    was rendered by the native code.

    const routingInstrumentation = new Sentry.ReactNavigationInstrumentation({
      enableTimeToInitialDisplay: true,
    });
    
    Sentry.init({
      integrations: [new Sentry.ReactNativeTracing({routingInstrumentation})],
    });
  • Tracing of full display using manual API (#​3654)

    In combination with the react-navigation automatic instrumentation you can record when
    the application screen is fully rendered.

    For more examples and manual time to initial display see the documentation.

    function Example() {
      const [loaded] = React.useState(false);
    
      return <View>
        <Sentry.TimeToFullDisplay record={loaded}>
          <Text>Example content</Text>
        </Sentry.TimeToFullDisplay>
      </View>;
    }
Fixes
  • Allow custom sentryUrl for Expo updates source maps uploads (#​3664)
  • Missing Mobile Vitals (slow, frozen frames) when ActiveSpan (Transaction) is trimmed at the end (#​3684)

v5.19.3

Compare Source

Fixes
  • Multiple Debug IDs can be loaded into the global polyfill (#​3660)
    • This fixes a symbolication issue with Expo on the web with enabled bundle splitting.
Dependencies

v5.19.2

Compare Source

Fixes
  • expo-upload-sourcemaps now works on Windows (#​3643)
  • Option enabled: false ensures no events are sent (#​3606)
  • Ignore JSON response when retrieving source context from local Expo Dev Server (#​3611)
  • Upload native debug files only for non-debug builds (#​3649)
  • TurboModuleRegistry should not be imported in web applications (#​3610)
Dependencies

v5.19.1

Compare Source

Fixes
  • Don't add Expo Plugin option authToken to application bundle (#​3630)
    • Expo plugin configurations are generelly stored in plain text, and are also automatically added to built app bundles, and are therefore considered insecure.
    • You should not set the auth token in the plugin config except for local testing. Instead, use the SENTRY_AUTH_TOKEN env variable, as pointed out in our docs.
    • In addition to showing a warning, we are now actively removing an authToken from the plugin config if it was set.
    • If you had set the auth token in the plugin config previously, and built and published an app with that config, you should rotate your token.
  • Reduce waning messages spam when a property in Expo plugin configuration is missing (#​3631)
  • Add concrete error messages for RN bundle build phase patch (#​3626)

v5.19.0

Compare Source

This release contains upgrade of sentry-android dependency to major version 7. There are no breaking changes in the JS API. If you are using the Android API please check the migration guide.

Features
  • Add Android profiles to React Native Profiling (#​3397)

  • Add Sentry.metrics (#​3590)

    To learn more, see the Set Up Metrics guide.

    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      dsn: '___DSN___',
      integrations: [
        Sentry.metrics.metricsAggregatorIntegration(),
      ],
    });
    
    Sentry.metrics.increment("button_click", 1, {
      tags: { system: "iOS", app_version: "1.0.0" },
    });
Fixes
  • Upload Debug Symbols Build Phase continues when node not found in WITH_ENVIRONMENT (#​3573)
  • Fix proguardUuid loading on Android (#​3591)
Dependencies

v5.18.0

Compare Source

Features
  • Add @spotlightjs/spotlight support (#​3550)

    Download the Spotlight desktop application and add the integration to your Sentry.init.

    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      dsn: '___DSN___',
      enableSpotlight: __DEV__,
    });
  • Only upload Expo artifact if source map exists (#​3568)

  • Read .env file in sentry-expo-upload-sourcemaps (#​3571)

Fixes
  • Prevent pod install crash when visionos is not present (#​3548)
  • Fetch Organization slug from @sentry/react-native/expo config when uploading artifacts (#​3557)
  • Remove 404 Http Client Errors reports for Metro Dev Server Requests (#​3553)
  • Stop tracing Spotlight Sidecar network request in JS (#​3559)

v5.17.0

Compare Source

Features
  • New Sentry Metro configuration function withSentryConfig (#​3478)

    • Ensures all Sentry configuration is added to your Metro config
    • Includes createSentryMetroSerializer
    • Collapses Sentry internal frames from the stack trace view in LogBox
    const { getDefaultConfig } = require('@&#8203;react-native/metro-config');
    const { withSentryConfig } = require('@&#8203;sentry/react-native/metro');
    
    const config = getDefaultConfig(__dirname);
    module.exports = withSentryConfig(config);
  • Add experimental visionOS support (#​3467)

Fixes
  • Fix WITH_ENVIRONMENT overwrite in sentry-xcode-debug-files.sh (#​3525)
  • Sentry CLI 2.25.1 fixes background debug files uploads during Xcode builds (#​3486)
  • Performance Tracing should be disabled by default (#​3533)
  • Use $NODE_BINARY to execute Sentry CLI in Xcode scripts (#​3493)
  • Return auto Release and Dist to source maps auto upload (#​3540)
  • Linked errors processed before other integrations (#​3535)
    • This ensure their frames are correctly symbolicated
Dependencies

v5.16.0

Compare Source

This release ships with a beta version of our new built-in Expo SDK 50 support,
which replaces the deprecated sentry-expo package. To learn more,
see the Expo guide.

Features
  • New @sentry/react-native/expo Expo config plugin (#​3429)

    const { withSentry } = require('@&#8203;sentry/react-native/expo');
    
    const config = {...};
    
    module.exports = withSentry(config, {
      url: 'https://www.sentry.io/',
      authToken: 'example-token', // Or use SENTRY_AUTH_TOKEN env
      project: 'project-slug', // Or use SENTRY_PROJECT env
      organization: 'org-slug', // Or use SENTRY_ORG env
    });
    • And Sentry.init in App.js
    import * as Sentry from '@&#8203;sentry/react-native';
    
    Sentry.init({
      dsn: '__DSN__',
    });
  • New getSentryExpoConfig for simple Metro configuration (#​3454, #​3501, #​3514)

    • This function is a drop in replacement for getDefaultConfig from expo/metro-config
    // const { getDefaultConfig } = require("expo/metro-config");
    const { getSentryExpoConfig } = require("@&#8203;sentry/react-native/metro");
    
    // const config = getDefaultConfig(__dirname);
    const config = getSentryExpoConfig(config, {});
  • New npx sentry-expo-upload-sourcemaps for simple EAS Update (npx expo export) source maps upload (#​3491, #​3510, #​3515, #​3507)

    SENTRY_PROJECT=project-slug \
    SENTRY_ORG=org-slug \
    SENTRY_AUTH_TOKEN=super-secret-token \
    npx sentry-expo-upload-sourcemaps dist
Others
  • Update sentry-xcode.sh scripts with Node modules resolution (#​3450)
    • RN SDK and Sentry CLI are dynamically resolved if override is not supplied
  • Resolve Default Integrations based on current platform (#​3465)
    • Native Integrations are only added if Native Module is available
    • Web Integrations only for React Native Web builds
  • Remove Native Modules warning from platform where the absence is expected (#​3466)
  • Add Expo Context information using Expo Native Modules (#​3466)
  • Errors from InternalBytecode.js are no longer marked as in_app (#​3518)
  • Fix system node can't be overwritten in sentry-xcode-debug-files.sh (#​3523)

v5.15.2

Compare Source

Fixes
  • Stop sending navigation route params for auto-generated transactions, as they may contain PII or other sensitive data (#​3487)

v5.15.1

Compare Source

Fixes
  • Sentry CLI upgrade resolves Xcode Could timeout during source maps upload #​3390
Dependencies

v5.15.0

Compare Source

Features
  • New simplified Sentry Metro Serializer export (#​3450)

    const { createSentryMetroSerializer } = require('@&#8203;sentry/react-native/metro');
Fixes
  • Encode envelopes using Base64, fix array length limit when transferring over Bridge. (#​2852)
    • This fix requires a rebuild of the native app
  • Symbolicate message and non-Error stacktraces locally in debug mode (#​3420)
  • Remove Sentry SDK frames from rejected promise SyntheticError stack (#​3423)
  • Fix path from Xcode scripts to Collect Modules (#​3451)
Dependencies

v5.14.1

Compare Source

Fixes
  • Add hermes to Pod dependencies to fix profiling with use_frameworks (#​3416)
  • Define SentryCurrentDateProvider in RNSentry (#​3418)

v5.14.0

Compare Source

Features
  • Add iOS profiles to React Native Profiling (#​3349)
Fixes
  • Conditionally use Set or CountingSet in Sentry Metro plugin (#​3409)
    • This makes sentryMetroSerializer compatible with Metro 0.66.2 and newer
  • Fix SIGSEV, SIGABRT and SIGBUS crashes happening after/around the August Google Play System update, see #​2955 for more details
Dependencies
  • Bump Android SDK from v6.33.1 to v6.34.0 (#​3408)
  • Bump JavaScript SDK from v7.80.0 to v7.81.1 ([#​3396](https://

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants