[英]Show/Get runtime, os, device contexts from Sentry Javascript
I am trying to get the runtime , os and/or device context/information that Sentry measures when send a event, for example:我正在尝试获取 Sentry 在发送事件时测量的运行时、操作系统和/或设备上下文/信息,例如:
I want to recycle that information in a react-native app to send to my API and make analytics;我想在 react-native 应用程序中回收该信息以发送到我的 API 并进行分析; so that information must be in a normal JavaScript object and need to be acquire in any moment, not only when the app crash and Sentry send events;).
因此信息必须在正常的 JavaScript object 中,并且需要随时获取,不仅在应用程序崩溃和 Sentry 发送事件时;)。
Can you help me with this, I only find forms to setContext and complete that information, but not how get it in runtime.你能帮我解决这个问题吗,我只找到forms来设置上下文并完成该信息,但不知道如何在运行时获取它。
Thank you every one for your support.谢谢大家的支持。
Those informations are collected by Sentry via their Native integrations ( https://github.com/getsentry/sentry-react-native ).这些信息由 Sentry 通过其本机集成( https://github.com/getsentry/sentry-react-native )收集。
I propose You to get those informations on Your own via https://github.com/react-native-community/react-native-device-info我建议您通过https://github.com/react-native-community/react-native-device-info自行获取这些信息
The base OS build the product is based on:构建产品的基本操作系统基于:
DeviceInfo.getBaseOs().then(baseOs => {
// "Windows", "Android" etc
});
Get the device name:获取设备名称:
DeviceInfo.getDeviceName().then(deviceName => {
// iOS: "Becca's iPhone 6"
// Android: ?
// Windows: ?
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.