前沿
在Android应用中接入Sentry可以帮助你捕获和监控应用中的错误和异常。Sentry 是一个开源的错误跟踪工具,支持多种平台,包括 Android。特别是能够私有化部署。
1.创建项目
2.AndroidManifest.xml 配置
<!-- Required: set your sentry.io project identifier (DSN) -->
<meta-data android:name="io.sentry.dsn" android:value="https://062854xxxxxx@sentry.xxxx.com/12" />
<!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
<meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
<!-- enable screenshot for crashes -->