Sentry 自动初始化不起作用,因为它在正在使用的库中被禁用

问题描述 投票:0回答:1

我通过 AndroidManifest.xml 使用 Sentry 配置。 在清单中我有这些行:

  <meta-data android:name="io.sentry.dsn" android:value="my_value" />
  <meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
  <meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
  <meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />

但是 Sentry 控制台是空的,我在 logcat 中看到了这个:

io.sentry.auto-init read: false

我还检查了使用过的库,发现其中一个在自己的清单中有这一行:

<meta-data android:name="io.sentry.auto-init" android:value="false" />

所以我尝试将这一行添加到我的清单中:

<meta-data android:name="io.sentry.auto-init" android:value="false" tools:replace="android:value"/>

看起来哨兵现在正在工作,但这是正确的决定吗?可能会有什么后果?

android android-manifest sentry manifest-merging
1个回答
0
投票

我们不建议在 SDK/库中使用 Sentry,原因如下:

哪个图书馆正在这样做?您应该接近他们并让他们知道他们不应该将

SentryAndroid.init
Sentry.init
作为库调用,因为这会与托管应用程序发生冲突。

© www.soinside.com 2019 - 2024. All rights reserved.