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 #7267

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 18, 2024

This PR contains the following updates:

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

Release Notes

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

v6.6.0

Compare Source

Features
  • Send Sentry React Native SDK version in the Session Replay Events on iOS (#​4450)
Fixes
  • Add mechanism field to unhandled rejection errors (#​4457)
  • Use proper SDK name for Session Replay tags (#​4428)
  • Use makeDsn from core to extract the URL from DSN avoiding unimplemented URL.protocol errors (#​4395)
Changes
  • Rename navigation.processing span to more expressive Navigation dispatch to screen A mounted/navigation cancelled (#​4423)
  • Add RN SDK package to sdk.packages for Cocoa (#​4381)
Internal
  • Initialize RNSentryTimeToDisplay during native module init on iOS (#​4443)
Dependencies

v6.5.0

Compare Source

Features
  • Mobile Session Replay is now generally available and ready for production use (#​4384)

    To learn about privacy, custom masking or performance overhead visit the documentation.

    import * as Sentry from '@​sentry/react-native';
    
    Sentry.init({
      replaysSessionSampleRate: 1.0,
      replaysOnErrorSampleRate: 1.0,
      integrations: [
        Sentry.mobileReplayIntegration({
          maskAllImages: true,
          maskAllVectors: true,
          maskAllText: true,
        }),
      ],
    });
  • Adds new captureFeedback and deprecates the captureUserFeedback API (#​4320)

    import * as Sentry from "@​sentry/react-native";
    
    const eventId = Sentry.lastEventId();
    
    Sentry.captureFeedback({
      name: "John Doe",
      email: "[email protected]",
      message: "Hello World!",
      associatedEventId: eventId, // optional
    });

    To learn how to attach context data to the feedback visit the documentation.

  • Export Span type from @sentry/types (#​4345)

  • Add RN SDK package to sdk.packages on Android (#​4380)

Fixes
  • Return lastEventId export from @sentry/core (#​4315)
  • Don't log file not found errors when loading envs in sentry-expo-upload-sourcemaps (#​4332)
  • Navigation Span should have no parent by default (#​4326)
  • Disable HTTP Client Errors on iOS (#​4347)
Changes
  • Falsy values of options.environment (empty string, undefined...) default to production
  • Deprecated _experiments.replaysSessionSampleRate and _experiments.replaysOnErrorSampleRate use replaysSessionSampleRate and replaysOnErrorSampleRate (#​4384)
Dependencies

v6.4.0

Compare Source

Features
  • Add Replay Custom Masking for iOS, Android and Web (#​4224, #​4265, #​4272, #​4314)

    import * as Sentry from '@​sentry/react-native';
    
    const Example = () => {
      return (
        <View>
          <Sentry.Mask>
            <Text>${"All children of Sentry.Mask will be masked."}</Text>
          </Sentry.Mask>
          <Sentry.Unmask>
            <Text>${"Only direct children of Sentry.Unmask will be unmasked."}</Text>
          </Sentry.Unmask>
        </View>
      );
    };

v6.3.0

Compare Source

Features
  • Add support for .env.sentry-build-plugin (#​4281)

    Don't commit the file to your repository. Use it to set your Sentry Auth Token.

    SENTRY_AUTH_TOKEN=your_token_here
    
  • Add Sentry Metro Server Source Context middleware (#​4287)

    This enables the SDK to add source context to locally symbolicated events using the Metro Development Server.
    The middleware can be disabled in metro.config.js using the enableSourceContextInDevelopment option.

    // Expo
    const { getSentryExpoConfig } = require('@&#8203;sentry/react-native/metro');
    const config = getSentryExpoConfig(__dirname, {
      enableSourceContextInDevelopment: false,
    });
    
    // React Native
    const { withSentryConfig } = require('@&#8203;sentry/react-native/metro');
    module.exports = withSentryConfig(config, {
      enableSourceContextInDevelopment: false,
    });
Fixes
  • Prevents exception capture context from being overwritten by native scope sync (#​4124)
  • Excludes Dev Server and Sentry Dsn requests from Breadcrumbs (#​4240)
  • Skips development server spans (#​4271)
  • Execute DebugSymbolicator after RewriteFrames to avoid overwrites by default (#​4285)
    • If custom RewriteFrames is provided the order changes
  • browserReplayIntegration is no longer included by default on React Native Web (#​4270)
  • Remove .sentry tmp directory and use environmental variables instead to save default Babel transformer path (#​4298)
    • This resolves concurrency issues when running multiple bundle processes
Dependencies

v6.2.0

Compare Source

Features
  • Enables Spotlight in Android and iOS SDKs (#​4211)

  • Add env flag SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD to allow disabling the debug file upload (#​4223)

    How to use in Android project? It works by default, just set export SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD=true in your build environment. For Sentry Android Gradle Plugin add the following to your android/app/build.gradle.

    apply from: "../../../sentry.gradle"
    
    sentry {
        autoUploadProguardMapping = shouldSentryAutoUpload()
        uploadNativeSymbols = shouldSentryAutoUpload()
    }

    How to use in Xcode? Make sure you are using scripts/sentry-xcode.sh and scripts/sentry-xcode-debug-files.sh in your
    build phases. And add the following to your ios/.xcode.env.local file.

    export SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD=true
Fixes
  • Ignore JavascriptException to filter out obfuscated duplicate JS Errors on Android (#​4232)
  • Skips ignoring require cycle logs for RN 0.70 or newer (#​4214)
  • Enhanced accuracy of time-to-display spans. (#​4189)
  • Fix Replay redacting of RN Classes on iOS (#​4243)
  • Speed up getBinaryImages for finishing transactions and capturing events (#​4194)
  • Remove duplicate HTTP Client Errors on iOS (#​4250)
  • Replay maskAll* set to false on iOS kept all masked (#​4257)
  • Add missing getRootSpan, withActiveSpan and suppressTracing exports from @sentry/core, and SeverityLevel export from @sentry/types (#​4254, #​4260)
Dependencies

v6.1.0

Compare Source

Dependencies

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 '@&#8203;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 '@&#8203;sentry/react-native';
    import { NavigationContainer } from '@&#8203;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.36.0

Compare Source

Fixes
Dependencies

v5.35.0

Compare Source

Fixes
  • Enhanced accuracy of time-to-display spans. (#​4042)
  • 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)

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, 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 reactNativeTracingIntegration().
    • new ReactNativeNavigationInstrumentation to reactNativeTracingIntegration().
    • 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 [email protected] 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
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


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.

@renovate renovate bot force-pushed the renovate/sentry-react-native-6.x branch from 294a558 to 8dbb185 Compare November 21, 2024 15:11
@renovate renovate bot force-pushed the renovate/sentry-react-native-6.x branch from 8dbb185 to 6273b3a Compare November 28, 2024 16:51
@renovate renovate bot changed the title Update dependency @sentry/react-native to v6 Update dependency @sentry/react-native to v6 - autoclosed Dec 3, 2024
@renovate renovate bot closed this Dec 3, 2024
@renovate renovate bot deleted the renovate/sentry-react-native-6.x branch December 3, 2024 18:42
@renovate renovate bot changed the title Update dependency @sentry/react-native to v6 - autoclosed Update dependency @sentry/react-native to v6 Dec 4, 2024
@renovate renovate bot reopened this Dec 4, 2024
@renovate renovate bot force-pushed the renovate/sentry-react-native-6.x branch from 6273b3a to bb517e2 Compare December 7, 2024 11:03
@renovate renovate bot force-pushed the renovate/sentry-react-native-6.x branch from bb517e2 to 95f1fb4 Compare January 6, 2025 20:47
@renovate renovate bot force-pushed the renovate/sentry-react-native-6.x branch from 95f1fb4 to 98aae6b Compare February 6, 2025 13:51
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