How to use the @sentry/react-native.Severity function in @sentry/react-native

To help you get started, we’ve selected a few @sentry/react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rastapasta / foodsharing / src / sagas / sentry.tsx View on Github external
while (true) {
    // Wait until we get ANY event
    const { type, payload } = yield take()

    if (type.startsWith('rrf') || type.startsWith('@'))
      continue

    if (filter[type])
      filter[type].forEach(path =>
        recursiveReplacer(path.split(/\./), payload)
      )

    Sentry.addBreadcrumb({
      category: 'redux',
      message: type,
      level: type.match(/ERROR/) ? Sentry.Severity.Warning : Sentry.Severity.Info,
      ...(payload ?
        {data: typeof payload === 'object' ? payload : {payload}} :
        {}
      )
    })
  }
}