简体   繁体   English

Android Sentry 未在仪表板中显示日志

[英]Android Sentry not showing logs in dashboard

I'm adding Sentry to my android wearable application to log crashes.我正在将 Sentry 添加到我的 android 可穿戴应用程序以记录崩溃。 However Sentry is not sending/showing any events in the dashboard.但是 Sentry 没有在仪表板中发送/显示任何事件。

I'm testing on an android emulator which has internet acces.我正在测试具有互联网访问权限的 android 模拟器。 I'm using the following setup:我正在使用以下设置:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);

    Sentry.init("http://public:private@sentry.io/app_id?async=false", new AndroidSentryClientFactory(this.getApplicationContext()));

    try{
        int i = 4 / 0;
    } catch (Throwable ex) {
        Sentry.capture(ex);
    }
}

AndroidManifest.xml: AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

The only logs I am getting are:我得到的唯一日志是:

03-04 18:58:54.214 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory: Construction of Android Sentry. 03-04 18:58:54.214 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory:Android Sentry 的构建。

03-04 18:58:54.226 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory: Sentry init with ctx='nl.jamieknoef.homewizard.homewizard_java.HomeWizardApp@82709d8' and dsn='Dsn{uri= http://sentry.io/ }' 03-04 18:58:54.226 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory:带有ctx='nl.jamieknoef.homewizard.8Homewizardd0.04.04.04.04.04.04.82.7.82.7.7.8.7.8.7.7.7.7.7.7.8Wizard的哨兵初始化'Dsn{uri= http://sentry.io/ }'

03-04 18:58:54.287 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory: Using buffer dir: /data/user/0/nl.jamieknoef.homewizard.homewizard_java/cache/sentry-buffered-events 03-04 18:58:54.287 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.AndroidSentryClientFactory:使用缓冲区目录:/data/user/0/nl.jamieknoef.homewizard.java/cache哨兵缓冲事件

03-04 18:58:54.376 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.event.helper.AndroidEventBuilderHelper: Proguard UUIDs file not found. 03-04 18:58:54.376 31757-31757/nl.jamieknoef.homewizard.homewizard_java D/io.sentry.android.event.helper.AndroidEventBuilderHelper:未找到 Proguard UUID 文件。

Any idea's what causing Sentry to not send events?任何想法是什么导致哨兵不发送事件?

I noticed Sentry doesn't immediatly send logs, it periodically sends your exceptions to their servers.我注意到 Sentry 不会立即发送日志,它会定期将您的异常发送到他们的服务器。 So if you crash your application on your first activity in the onCreate method like I did, it probably won't get the time to ever send your exceptions.因此,如果您像我一样在 onCreate 方法中的第一个活动中使您的应用程序崩溃,它可能没有时间发送您的异常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM