在本机Expo应用程序上记录Sentry事件

时间:2019-06-02 01:13:01

标签: javascript react-native expo sentry react-native-sentry

我有一个使用expo的React Native应用,并遵循此处的设置指南-https://docs.expo.io/versions/latest/guides/using-sentry/

我正在发布到一个发布通道,我想对其进行测试。如果我只是运行expo publish,它将向我们的用户推送一个新版本,我不想这样做。在Sentry仪表板中,每次运行expo publish --release-channel测试时,我都会在“统计”下看到我的发布,但是仅此而已。我没有看到任何记录,它仍然显示*您快到了!仅在顶部几行代码即可捕获错误。*我在某处错过了一步吗?

我的App.js看起来像这样:

import App from './app/index';
import Sentry from 'sentry-expo';

Sentry.enableInExpoDevelopment = true;

Sentry.config('my-DSN-here').install();

export default App;

我的app.json:

{
  "expo": {
    "name": "foo",
    "slug": "foo",
    "version": "1.0.10",
    "sdkVersion": "28.0.0",
    "ios": {
      "bundleIdentifier": "foo",
      "buildNumber": "1.0.10",
      "supportsTablet": true,
    },
    "android": {
      "package": "foo",
      "versionCode": 10,
      "icon": "./app/assets/images/app-icon.png",
      "googleServicesFile": "./google-services.json"
    },
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "org-name-here",
            "project": "project-name-here",
            "authToken": "authToken-here"
          }
        }
      ]
    }
  }
}

0 个答案:

没有答案