Search code examples
javascriptsentryreact-native-sentry

Send warning messages to Sentry (react-native-sentry)


I have include Sentry to track crashes of my mobile application. It is working properly, now I want to send warning messages to sentry to track them. Is there a way to do this from JavaScript side. Thanks.


Solution

  • // set a custom message
    Sentry.captureMessage("TEST message", {
      level: SentrySeverity.Warning
    }); // Default SentrySeverity.Error
    

    There's a lot of available methods highlight in the React Native config docs.