use of com.taobao.weex.adapter.IWXUserTrackAdapter in project weex-example by KalicyZhou.
the class WXBridgeManager method commitJSFrameworkAlarmMonitor.
public void commitJSFrameworkAlarmMonitor(final String type, final WXErrorCode errorCode, String errMsg) {
final IWXUserTrackAdapter userTrackAdapter = WXSDKManager.getInstance().getIWXUserTrackAdapter();
if (userTrackAdapter == null || TextUtils.isEmpty(type) || errorCode == null) {
return;
}
WXPerformance performance = new WXPerformance();
performance.errCode = errorCode.getErrorCode();
if (errorCode != WXErrorCode.WX_SUCCESS) {
performance.appendErrMsg(TextUtils.isEmpty(errMsg) ? errorCode.getErrorMsg() : errMsg);
WXLogUtils.e("wx_monitor", performance.toString());
}
userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null);
}
use of com.taobao.weex.adapter.IWXUserTrackAdapter in project weex-example by KalicyZhou.
the class WXBridgeManager method commitJSBridgeAlarmMonitor.
public void commitJSBridgeAlarmMonitor(String instanceId, WXErrorCode errCode, String errMsg) {
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
IWXUserTrackAdapter adapter = WXSDKManager.getInstance().getIWXUserTrackAdapter();
if (instance == null || adapter == null || errCode == null) {
return;
}
WXPerformance performance = new WXPerformance();
performance.args = instance.getBundleUrl();
performance.errCode = errCode.getErrorCode();
if (errCode != WXErrorCode.WX_SUCCESS) {
performance.appendErrMsg(TextUtils.isEmpty(errMsg) ? errCode.getErrorMsg() : errMsg);
WXLogUtils.e("wx_monitor", performance.toString());
}
adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams());
}
Aggregations