@arms/rum-reactnative 0.1.2 → 0.1.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -1
- package/RumSdkReactnative.podspec +28 -0
- package/android/build.gradle +83 -0
- package/android/gradle.properties +6 -0
- package/android/src/main/AndroidManifest.xml +13 -0
- package/android/src/main/java/com/rumsdkreactnative/RumSdkReactnativeModule.kt +512 -0
- package/android/src/main/java/com/rumsdkreactnative/RumSdkReactnativePackage.kt +33 -0
- package/android/src/main/java/com/rumsdkreactnative/crash/CrashContextManager.kt +157 -0
- package/android/src/main/java/com/rumsdkreactnative/crash/CrashHandler.kt +444 -0
- package/android/src/main/java/com/rumsdkreactnative/crash/CrashInitProvider.kt +50 -0
- package/android/src/main/java/com/rumsdkreactnative/crash/NdkCrashHandler.kt +66 -0
- package/android/src/main/jni/CMakeLists.txt +21 -0
- package/android/src/main/jni/rum_backtrace.c +144 -0
- package/android/src/main/jni/rum_crash_handler.c +200 -0
- package/android/src/main/jni/rum_crash_writer.c +436 -0
- package/android/src/main/jni/rum_module_info.c +355 -0
- package/android/src/main/jni/rum_module_info.h +58 -0
- package/android/src/main/jni/rum_test_crash.cpp +55 -0
- package/app.plugin.js +11 -0
- package/docs/ReactNative SDK/351/205/215/347/275/256/345/217/202/350/200/203.md" +671 -0
- package/docs/SDK /347/211/210/346/234/254/350/257/264/346/230/216.md" +12 -0
- package/docs//346/216/245/345/205/245ReactNative/345/272/224/347/224/250.md +238 -0
- package/ios/PrivacyInfo.xcprivacy +93 -0
- package/ios/RumCrashReporter.h +38 -0
- package/ios/RumCrashReporter.mm +861 -0
- package/ios/RumSdkReactnative.h +5 -0
- package/ios/RumSdkReactnative.mm +291 -0
- package/ios/fishhook/fishhook.c +264 -0
- package/ios/fishhook/fishhook.h +76 -0
- package/lib/commonjs/NativeRumSdkReactnative.js +50 -0
- package/lib/commonjs/collector/action/index.js +108 -0
- package/lib/commonjs/collector/exception/crash.js +148 -0
- package/lib/commonjs/collector/exception/index.js +238 -0
- package/lib/commonjs/collector/index.js +42 -0
- package/lib/commonjs/collector/resource/api.js +286 -0
- package/lib/commonjs/collector/view/perf.js +79 -0
- package/lib/commonjs/collector/view/pv.js +88 -0
- package/lib/commonjs/expoConfigPlugin.js +37 -0
- package/lib/commonjs/index.js +29 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/plugin.js +47 -0
- package/lib/commonjs/processor/default-processor.js +27 -0
- package/lib/commonjs/processor/session-processor.js +47 -0
- package/lib/commonjs/reporter/index.js +148 -0
- package/lib/commonjs/reporter/monitor-reporter.js +43 -0
- package/lib/commonjs/shell.js +91 -0
- package/lib/commonjs/types/client.js +6 -0
- package/lib/commonjs/types/crash.js +37 -0
- package/lib/commonjs/types/index.js +2 -0
- package/lib/commonjs/utils/action.js +305 -0
- package/lib/commonjs/utils/api.js +83 -0
- package/lib/commonjs/utils/base.js +95 -0
- package/lib/commonjs/utils/crash.js +149 -0
- package/lib/commonjs/utils/platform.js +162 -0
- package/lib/commonjs/utils/session.js +158 -0
- package/lib/commonjs/utils/url.js +59 -0
- package/lib/commonjs/utils/view.js +93 -0
- package/lib/module/NativeRumSdkReactnative.js +47 -0
- package/lib/module/collector/action/index.js +45 -10
- package/lib/module/collector/exception/crash.js +143 -0
- package/lib/module/collector/exception/index.js +144 -46
- package/lib/module/collector/index.js +8 -0
- package/lib/module/collector/resource/api.js +6 -6
- package/lib/module/collector/view/pv.js +11 -0
- package/lib/module/expoConfigPlugin.js +33 -0
- package/lib/module/index.js +1 -0
- package/lib/module/processor/session-processor.js +22 -0
- package/lib/module/reporter/index.js +102 -16
- package/lib/module/reporter/monitor-reporter.js +38 -0
- package/lib/module/shell.js +11 -7
- package/lib/module/types/crash.js +33 -0
- package/lib/module/utils/action.js +299 -0
- package/lib/module/utils/crash.js +144 -0
- package/lib/module/utils/platform.js +124 -72
- package/lib/module/utils/session.js +23 -4
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeRumSdkReactnative.d.ts +49 -0
- package/lib/typescript/{src → commonjs/src}/collector/action/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/collector/exception/crash.d.ts +28 -0
- package/lib/typescript/{src → commonjs/src}/collector/exception/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/collector/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/expoConfigPlugin.d.ts +28 -0
- package/lib/typescript/commonjs/src/index.d.ts +6 -0
- package/lib/typescript/{src → commonjs/src}/processor/session-processor.d.ts +2 -0
- package/lib/typescript/{src → commonjs/src}/reporter/index.d.ts +3 -1
- package/lib/typescript/commonjs/src/reporter/monitor-reporter.d.ts +8 -0
- package/lib/typescript/{src → commonjs/src}/shell.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/crash.d.ts +95 -0
- package/lib/typescript/commonjs/src/utils/action.d.ts +63 -0
- package/lib/typescript/commonjs/src/utils/crash.d.ts +12 -0
- package/lib/typescript/commonjs/src/utils/platform.d.ts +22 -0
- package/lib/typescript/{src → commonjs/src}/utils/session.d.ts +4 -0
- package/lib/typescript/module/src/NativeRumSdkReactnative.d.ts +49 -0
- package/lib/typescript/module/src/collector/action/index.d.ts +21 -0
- package/lib/typescript/module/src/collector/exception/crash.d.ts +28 -0
- package/lib/typescript/module/src/collector/exception/index.d.ts +32 -0
- package/lib/typescript/module/src/collector/index.d.ts +6 -0
- package/lib/typescript/module/src/collector/resource/api.d.ts +21 -0
- package/lib/typescript/module/src/collector/view/perf.d.ts +1 -0
- package/lib/typescript/module/src/collector/view/pv.d.ts +16 -0
- package/lib/typescript/module/src/expoConfigPlugin.d.ts +28 -0
- package/lib/typescript/module/src/index.d.ts +6 -0
- package/lib/typescript/module/src/plugin.d.ts +3 -0
- package/lib/typescript/module/src/processor/default-processor.d.ts +6 -0
- package/lib/typescript/module/src/processor/session-processor.d.ts +11 -0
- package/lib/typescript/module/src/reporter/index.d.ts +18 -0
- package/lib/typescript/module/src/reporter/monitor-reporter.d.ts +8 -0
- package/lib/typescript/module/src/shell.d.ts +57 -0
- package/lib/typescript/module/src/types/client.d.ts +27 -0
- package/lib/typescript/module/src/types/crash.d.ts +95 -0
- package/lib/typescript/module/src/types/index.d.ts +118 -0
- package/lib/typescript/module/src/utils/action.d.ts +63 -0
- package/lib/typescript/module/src/utils/api.d.ts +59 -0
- package/lib/typescript/module/src/utils/base.d.ts +8 -0
- package/lib/typescript/module/src/utils/crash.d.ts +12 -0
- package/lib/typescript/module/src/utils/platform.d.ts +22 -0
- package/lib/typescript/module/src/utils/session.d.ts +41 -0
- package/lib/typescript/module/src/utils/url.d.ts +17 -0
- package/lib/typescript/module/src/utils/view.d.ts +13 -0
- package/package.json +51 -28
- package/lib/module/collector/action/index.js.map +0 -1
- package/lib/module/collector/exception/index.js.map +0 -1
- package/lib/module/collector/resource/api.js.map +0 -1
- package/lib/module/collector/view/perf.js.map +0 -1
- package/lib/module/collector/view/pv.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/plugin.js.map +0 -1
- package/lib/module/processor/default-processor.js.map +0 -1
- package/lib/module/processor/session-processor.js.map +0 -1
- package/lib/module/reporter/index.js.map +0 -1
- package/lib/module/shell.js.map +0 -1
- package/lib/module/types/client.js.map +0 -1
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/utils/api.js.map +0 -1
- package/lib/module/utils/base.js.map +0 -1
- package/lib/module/utils/platform.js.map +0 -1
- package/lib/module/utils/session.js.map +0 -1
- package/lib/module/utils/url.js.map +0 -1
- package/lib/module/utils/view.js.map +0 -1
- package/lib/typescript/src/collector/action/index.d.ts.map +0 -1
- package/lib/typescript/src/collector/exception/index.d.ts.map +0 -1
- package/lib/typescript/src/collector/resource/api.d.ts.map +0 -1
- package/lib/typescript/src/collector/view/perf.d.ts.map +0 -1
- package/lib/typescript/src/collector/view/pv.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -4
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/plugin.d.ts.map +0 -1
- package/lib/typescript/src/processor/default-processor.d.ts.map +0 -1
- package/lib/typescript/src/processor/session-processor.d.ts.map +0 -1
- package/lib/typescript/src/reporter/index.d.ts.map +0 -1
- package/lib/typescript/src/shell.d.ts.map +0 -1
- package/lib/typescript/src/types/client.d.ts.map +0 -1
- package/lib/typescript/src/types/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/api.d.ts.map +0 -1
- package/lib/typescript/src/utils/base.d.ts.map +0 -1
- package/lib/typescript/src/utils/platform.d.ts +0 -15
- package/lib/typescript/src/utils/platform.d.ts.map +0 -1
- package/lib/typescript/src/utils/session.d.ts.map +0 -1
- package/lib/typescript/src/utils/url.d.ts.map +0 -1
- package/lib/typescript/src/utils/view.d.ts.map +0 -1
- /package/lib/typescript/{src → commonjs/src}/collector/resource/api.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/collector/view/perf.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/collector/view/pv.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/plugin.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/processor/default-processor.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/types/client.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/types/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/api.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/base.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/url.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/view.d.ts +0 -0
- /package/lib/typescript/{package.json → module/package.json} +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 崩溃相关类型定义
|
|
3
|
+
*/
|
|
4
|
+
/** 崩溃上下文同步事件名 */
|
|
5
|
+
export declare const CRASH_CONTEXT_EVENT = "crash_context_change";
|
|
6
|
+
/** 崩溃上报确认事件名(reporter -> crash collector,用于 ack 后删除文件) */
|
|
7
|
+
export declare const CRASH_REPORT_ACK_EVENT = "crash_report_ack";
|
|
8
|
+
/**
|
|
9
|
+
* 挂在崩溃 RumEvent 上的瞬态字段名,携带 crash_id。
|
|
10
|
+
* reporter 上报前提取用于 ack、并在序列化前剥离,不会发送到后端。
|
|
11
|
+
*/
|
|
12
|
+
export declare const CRASH_ID_FIELD = "__rum_crash_id";
|
|
13
|
+
/** 崩溃上报确认事件负载 */
|
|
14
|
+
export interface CrashReportAck {
|
|
15
|
+
/** 本次上报包含的 crash_id 列表 */
|
|
16
|
+
crashIds: string[];
|
|
17
|
+
/** 上报是否成功(HTTP 2xx) */
|
|
18
|
+
success: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 崩溃上下文快照(session / view 变更时同步到原生侧)。
|
|
22
|
+
*/
|
|
23
|
+
export interface CrashContextSnapshot {
|
|
24
|
+
session_id?: string;
|
|
25
|
+
view_id?: string;
|
|
26
|
+
view_name?: string;
|
|
27
|
+
user_id?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 原生崩溃栈帧数据结构。
|
|
31
|
+
*/
|
|
32
|
+
export interface NativeCrashFrame {
|
|
33
|
+
library?: string;
|
|
34
|
+
symbol?: string;
|
|
35
|
+
address?: string;
|
|
36
|
+
/** 模块加载基址(Android NDK 提供,供后端结合 build_id 符号化) */
|
|
37
|
+
image_addr?: string;
|
|
38
|
+
offset?: string;
|
|
39
|
+
line?: number;
|
|
40
|
+
/** 截断标记帧:true 表示此帧为双侧截断的中间标记,非实际栈帧 */
|
|
41
|
+
truncated?: boolean;
|
|
42
|
+
/** 被省略的帧数(-1 表示未知总数,NDK 场景) */
|
|
43
|
+
omitted_count?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 原生崩溃数据结构(与原生侧 RumCrashReporter / CrashContextManager 写入的 JSON 对齐)。
|
|
47
|
+
* 仅声明 JS 层会用到的字段,未列出的字段会通过 snapshots 透传给后端。
|
|
48
|
+
*/
|
|
49
|
+
export interface NativeCrashData {
|
|
50
|
+
/** crash_id 可选,兼容旧版 NDK 崩溃文件(无 crash_id 字段) */
|
|
51
|
+
crash_id?: string;
|
|
52
|
+
timestamp?: number;
|
|
53
|
+
signal?: {
|
|
54
|
+
name?: string;
|
|
55
|
+
/** NDK 写入为数字(si_code),Java 侧可能为字符串 */
|
|
56
|
+
code?: string | number;
|
|
57
|
+
fault_address?: string;
|
|
58
|
+
/** NDK 信号编号 */
|
|
59
|
+
number?: number;
|
|
60
|
+
};
|
|
61
|
+
exception?: {
|
|
62
|
+
type?: string;
|
|
63
|
+
class_name?: string;
|
|
64
|
+
message?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 顶层 frames(NDK 崩溃格式)。
|
|
68
|
+
* NDK 崩溃 JSON 的 frames 在顶层,不在 crashed_thread 内。
|
|
69
|
+
*/
|
|
70
|
+
frames?: NativeCrashFrame[] | string[];
|
|
71
|
+
crashed_thread?: {
|
|
72
|
+
id?: number | string;
|
|
73
|
+
/** frames 兼容新版对象格式和旧版字符串格式 */
|
|
74
|
+
frames?: NativeCrashFrame[] | string[];
|
|
75
|
+
};
|
|
76
|
+
/** NDK 崩溃进程 ID */
|
|
77
|
+
pid?: number;
|
|
78
|
+
/** NDK 崩溃线程 ID */
|
|
79
|
+
tid?: number;
|
|
80
|
+
/** NDK 崩溃架构(arm64/arm/x86_64/x86) */
|
|
81
|
+
arch?: string;
|
|
82
|
+
binary_images?: unknown[];
|
|
83
|
+
device?: Record<string, unknown>;
|
|
84
|
+
registers?: Record<string, unknown>;
|
|
85
|
+
app?: Record<string, unknown>;
|
|
86
|
+
context?: {
|
|
87
|
+
session_id?: string;
|
|
88
|
+
view_id?: string;
|
|
89
|
+
view_name?: string;
|
|
90
|
+
user_id?: string;
|
|
91
|
+
};
|
|
92
|
+
/** 崩溃机制信息(iOS normalizeKSCrashReport / Android getPendingCrashes 写入) */
|
|
93
|
+
mechanism?: Record<string, unknown>;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=crash.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 行为事件监听 & React Native 触摸自动采集
|
|
3
|
+
*
|
|
4
|
+
* 通过 patch React 的元素创建函数(createElement 及自动 JSX 运行时
|
|
5
|
+
* jsx/jsxs/jsxDEV),自动拦截 Pressable / TouchableOpacity 等可触摸组件的
|
|
6
|
+
* onPress,并从触摸事件(GestureResponderEvent)、onLayout、props/children 中
|
|
7
|
+
* 提取丰富的行为数据(位置、尺寸、持续时间、语义化名称、快照等),发射标准事件
|
|
8
|
+
* 给 ActionCollector。
|
|
9
|
+
*
|
|
10
|
+
* 说明:现代 RN/Expo(babel-preset-expo)默认使用「automatic」JSX 运行时,
|
|
11
|
+
* JSX 会被编译为 react/jsx-runtime 的 jsx()/jsxs()(生产)或
|
|
12
|
+
* react/jsx-dev-runtime 的 jsxDEV()(开发),而非 React.createElement。
|
|
13
|
+
* 因此必须同时 patch 这三者才能覆盖所有场景。
|
|
14
|
+
*/
|
|
15
|
+
export interface ActionEvent {
|
|
16
|
+
/** 行为类型,固定为 tap */
|
|
17
|
+
type: string;
|
|
18
|
+
/** 语义化名称,如 `tap Pressable#btn-login: 登录` */
|
|
19
|
+
name?: string;
|
|
20
|
+
/** 目标元素标识(selector),如 `Pressable#btn-login` */
|
|
21
|
+
targetName?: string;
|
|
22
|
+
/** 从按下到抬起的持续时间(毫秒),需要 onPressIn 支持 */
|
|
23
|
+
duration?: number;
|
|
24
|
+
/** 点击位置信息(相对屏幕 x/y,相对元素 ex/ey),用于热力图分析 */
|
|
25
|
+
position?: {
|
|
26
|
+
x?: number;
|
|
27
|
+
y?: number;
|
|
28
|
+
ex?: number;
|
|
29
|
+
ey?: number;
|
|
30
|
+
};
|
|
31
|
+
/** 目标元素信息 */
|
|
32
|
+
target: {
|
|
33
|
+
id: string;
|
|
34
|
+
/** 关键属性快照 { id, testID, accessibilityLabel } */
|
|
35
|
+
dataset: Record<string, any>;
|
|
36
|
+
selector?: string;
|
|
37
|
+
width?: number;
|
|
38
|
+
height?: number;
|
|
39
|
+
/** 是否为可交互元素(1=可交互),用于无效点击分析 */
|
|
40
|
+
reaction?: number;
|
|
41
|
+
/** 是否为可信交互(1=真实原生触摸),用于错误点击分析 */
|
|
42
|
+
trust?: number;
|
|
43
|
+
};
|
|
44
|
+
currentTarget?: {
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export type ActionListener = (event: ActionEvent) => void;
|
|
49
|
+
export declare function addActionListener(listener: ActionListener): void;
|
|
50
|
+
export declare function removeActionListener(listener: ActionListener): void;
|
|
51
|
+
/**
|
|
52
|
+
* 开始自动采集用户点击行为
|
|
53
|
+
*
|
|
54
|
+
* 原理:patch React.createElement 以及 automatic JSX 运行时的 jsx/jsxs/jsxDEV,
|
|
55
|
+
* 当组件为可触摸类型且含 onPress + id/testID/accessibilityLabel 时,
|
|
56
|
+
* 包装 onPress 使其在调用时自动 emit action 事件。
|
|
57
|
+
*/
|
|
58
|
+
export declare function startTrackingActions(): void;
|
|
59
|
+
/**
|
|
60
|
+
* 停止自动采集
|
|
61
|
+
*/
|
|
62
|
+
export declare function stopTrackingActions(): void;
|
|
63
|
+
//# sourceMappingURL=action.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RumEvent } from '@arms/rum-core';
|
|
2
|
+
import type { NativeCrashData } from '../types/crash';
|
|
3
|
+
/**
|
|
4
|
+
* 将原生崩溃数据转换为 RumEvent 异常事件,对齐存储模型 Exception 表的
|
|
5
|
+
* Attributes(session/view/exception 基础信息)+ Metadata(堆栈、快照等)字段。
|
|
6
|
+
*/
|
|
7
|
+
export declare function convertCrashToRumEvent(crashData: NativeCrashData): RumEvent;
|
|
8
|
+
/**
|
|
9
|
+
* 安全调用原生桥方法,异常时静默降级。
|
|
10
|
+
*/
|
|
11
|
+
export declare function safeNativeCall<T>(fn: () => Promise<T>, label?: string): Promise<T | undefined>;
|
|
12
|
+
//# sourceMappingURL=crash.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RumEventBundle } from '@arms/rum-core';
|
|
2
|
+
export declare const VERSION: string;
|
|
3
|
+
export interface Global {
|
|
4
|
+
ErrorUtils: {
|
|
5
|
+
setGlobalHandler: any;
|
|
6
|
+
reportFatalError: any;
|
|
7
|
+
getGlobalHandler: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare var global: Global;
|
|
11
|
+
export declare const appName = "react-native";
|
|
12
|
+
export declare function getStorage(key: string): Promise<string | null>;
|
|
13
|
+
export declare function setStorage(key: string, data: string): Promise<void>;
|
|
14
|
+
export declare function removeStorage(key: string): Promise<void>;
|
|
15
|
+
export declare function clearStorage(): Promise<void>;
|
|
16
|
+
export declare function getAllStorageKeys(): Promise<string[]>;
|
|
17
|
+
/**
|
|
18
|
+
* 将设备 / 系统 / 网络等公共属性注入 bundle。
|
|
19
|
+
* 在 Reporter.request 中被调用;首次调用时懒触发设备信息采集。
|
|
20
|
+
*/
|
|
21
|
+
export declare const fixAttrs: (bundle: RumEventBundle) => Promise<RumEventBundle | undefined>;
|
|
22
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -8,6 +8,10 @@ interface SessionInfo {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class RumSession implements IRumSession {
|
|
10
10
|
ctx?: IContext;
|
|
11
|
+
/** 平台类型标识 */
|
|
12
|
+
appType: string;
|
|
13
|
+
/** SDK 版本号(延迟导入避免循环依赖) */
|
|
14
|
+
get sdkVersion(): string;
|
|
11
15
|
sessionConfig: SessionConfig;
|
|
12
16
|
private session;
|
|
13
17
|
private userId;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* 原生设备信息,对应存储模型中的公共属性:
|
|
4
|
+
* - device.* (id / type / brand / model / name)
|
|
5
|
+
* - os.* (type / version / container / container_version)
|
|
6
|
+
* - app.package
|
|
7
|
+
* - viewport.width / viewport.height
|
|
8
|
+
*/
|
|
9
|
+
export interface NativeDeviceInfo {
|
|
10
|
+
device_id?: string;
|
|
11
|
+
device_type?: string;
|
|
12
|
+
device_brand?: string;
|
|
13
|
+
device_model?: string;
|
|
14
|
+
device_name?: string;
|
|
15
|
+
os_type?: string;
|
|
16
|
+
os_version?: string;
|
|
17
|
+
app_package?: string;
|
|
18
|
+
app_version?: string;
|
|
19
|
+
viewport_width?: number;
|
|
20
|
+
viewport_height?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface Spec extends TurboModule {
|
|
23
|
+
getItem(key: string): Promise<string | null>;
|
|
24
|
+
setItem(key: string, value: string): Promise<void>;
|
|
25
|
+
removeItem(key: string): Promise<void>;
|
|
26
|
+
clear(): Promise<void>;
|
|
27
|
+
getAllKeys(): Promise<string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* 采集原生平台设备信息,仅在初始化时调用一次。
|
|
30
|
+
*/
|
|
31
|
+
getDeviceInfo(): Promise<NativeDeviceInfo>;
|
|
32
|
+
/** 获取待上报的崩溃报告列表(下次启动时调用) */
|
|
33
|
+
getPendingCrashes(): Promise<string>;
|
|
34
|
+
/** 清除已上报的崩溃文件 */
|
|
35
|
+
clearCrashReports(crashIds: string): Promise<void>;
|
|
36
|
+
/** 清除所有崩溃报告文件(用于清理无 crash_id 的旧版文件) */
|
|
37
|
+
clearAllCrashReports(): Promise<void>;
|
|
38
|
+
/** 清理过期和超限的崩溃文件(maxFiles 上限,maxAgeMs 过期时间) */
|
|
39
|
+
cleanupOldCrashes(maxFiles: number, maxAgeMs: number): Promise<void>;
|
|
40
|
+
/** 查询上次运行是否发生过崩溃 */
|
|
41
|
+
crashedLastRun(): Promise<boolean>;
|
|
42
|
+
/** 更新崩溃上下文快照(session/view 变更时调用) */
|
|
43
|
+
updateCrashContext(context: string): void;
|
|
44
|
+
/** 触发测试崩溃(仅用于开发调试,调用后 App 立即崩溃) */
|
|
45
|
+
triggerTestCrash(crashType: string): void;
|
|
46
|
+
}
|
|
47
|
+
declare const _default: Spec;
|
|
48
|
+
export default _default;
|
|
49
|
+
//# sourceMappingURL=NativeRumSdkReactnative.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ICollector, IContext, RumActionEvent, RumEvent } from '@arms/rum-core';
|
|
2
|
+
export default class ActionCollector implements ICollector {
|
|
3
|
+
name: string;
|
|
4
|
+
private DELAY_TIME;
|
|
5
|
+
ctx?: IContext;
|
|
6
|
+
sendEvent?: (payload: RumEvent) => void;
|
|
7
|
+
events: string[];
|
|
8
|
+
lastEvent?: RumActionEvent;
|
|
9
|
+
lastActionId?: string;
|
|
10
|
+
timer: any;
|
|
11
|
+
setup(ctx: IContext, sendEvent: (payload: RumEvent) => void): void;
|
|
12
|
+
onEvent: (e: any) => void;
|
|
13
|
+
/**
|
|
14
|
+
* 组装热力图相关的 target 信息(selector/宽高/可交互性/可信度)。
|
|
15
|
+
* 当没有任何字段时返回 undefined,避免上报空对象。
|
|
16
|
+
*/
|
|
17
|
+
private buildTarget;
|
|
18
|
+
sendAction: () => void;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ICollector, IContext, SendEventFn } from '@arms/rum-core';
|
|
2
|
+
/**
|
|
3
|
+
* 崩溃采集器(Exception 的子类型):
|
|
4
|
+
* 1. 初始化时读取上次运行写入的原生崩溃文件,转换为 RumEvent 通过标准管线上报;
|
|
5
|
+
* 2. 通过 ctx.emitter 订阅上下文变更事件,同步到原生侧
|
|
6
|
+
* (用于下一次启动时崩溃报告携带正确上下文)。
|
|
7
|
+
*/
|
|
8
|
+
export default class CrashCollector implements ICollector {
|
|
9
|
+
name: string;
|
|
10
|
+
private ctx?;
|
|
11
|
+
private sendEvent?;
|
|
12
|
+
private initialized;
|
|
13
|
+
/** 已上报待确认(ack)的 crash_id,成功后才删文件 */
|
|
14
|
+
private pendingAckIds;
|
|
15
|
+
setup(ctx: IContext, sendEvent: SendEventFn): void;
|
|
16
|
+
private processPendingCrashes;
|
|
17
|
+
/** 兜底清理:删除过期和超限的崩溃文件,防止存储耗尽 */
|
|
18
|
+
private cleanupOldCrashes;
|
|
19
|
+
private onCrashContextChange;
|
|
20
|
+
/**
|
|
21
|
+
* reporter 上报确认回调:
|
|
22
|
+
* - 成功:删除对应 crash_id 的崩溃文件(确保上报成功后才删,不丢数据);
|
|
23
|
+
* - 失败:保留文件,下次启动重试,仅从内存待确认集合中移除。
|
|
24
|
+
*/
|
|
25
|
+
private onCrashReportAck;
|
|
26
|
+
destroy(): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=crash.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ICollector, IContext, RumEvent } from '@arms/rum-core';
|
|
2
|
+
export default class ExceptionCollector implements ICollector {
|
|
3
|
+
name: string;
|
|
4
|
+
ctx?: IContext;
|
|
5
|
+
sendEvent?: (payload: RumEvent) => void;
|
|
6
|
+
private installed;
|
|
7
|
+
/** fatal 去重保护:防止连续 fatal error 重复上报 */
|
|
8
|
+
private handlingFatal;
|
|
9
|
+
/** 防止 errorHandle 内部 console.error 形成循环 */
|
|
10
|
+
private inErrorHandle;
|
|
11
|
+
private origin;
|
|
12
|
+
setup(ctx: IContext, sendEvent: (payload: RumEvent) => void): void;
|
|
13
|
+
hackOrigin(): void;
|
|
14
|
+
/** JSC 引擎 Promise rejection 兜底方案 */
|
|
15
|
+
private setupJSCPromiseRejection;
|
|
16
|
+
onError: (e: Error | string, isFatal?: boolean) => void;
|
|
17
|
+
onUnhandled: (_id: string, error: unknown) => void;
|
|
18
|
+
errorHandle: (error: any, source?: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* 根据stack获取Error信息
|
|
21
|
+
* TODO: 增加基于Stack解析filename和lineNumber的能力
|
|
22
|
+
* @param stack
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
getErrorByStack(stack?: string): {
|
|
26
|
+
name: string;
|
|
27
|
+
message: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
errorFilter(err: Error): boolean;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as PvCollector } from './view/pv';
|
|
2
|
+
export { default as ExceptionCollector } from './exception/index';
|
|
3
|
+
export { default as CrashCollector } from './exception/crash';
|
|
4
|
+
export { default as ApiCollector } from './resource/api';
|
|
5
|
+
export { default as ActionCollector } from './action/index';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ICollector, IContext, ITracingHeaders, RumEvent } from '@arms/rum-core';
|
|
2
|
+
import { IApiAttr, IApiCache } from '../../utils/api';
|
|
3
|
+
declare global {
|
|
4
|
+
interface XMLHttpRequest {
|
|
5
|
+
apiAttr: IApiAttr;
|
|
6
|
+
apiCache: IApiCache;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export default class ApiCollector implements ICollector {
|
|
10
|
+
name: string;
|
|
11
|
+
private ctx?;
|
|
12
|
+
private sendEvent?;
|
|
13
|
+
private originFetch;
|
|
14
|
+
setup(ctx: IContext, sendEvent: (payload: RumEvent) => void): void;
|
|
15
|
+
injectTracing(apiAttr: IApiAttr, inject: (tracingHeaders: ITracingHeaders) => void): void;
|
|
16
|
+
hackXhr(): void;
|
|
17
|
+
hackFetch(): void;
|
|
18
|
+
sendAPI(apiAttr: IApiAttr, entry: any): void;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=perf.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ICollector, IContext, RumEvent } from '@arms/rum-core';
|
|
2
|
+
import { IPage } from '../../types/client';
|
|
3
|
+
import { Route } from '../../types';
|
|
4
|
+
export default class PvCollector implements ICollector {
|
|
5
|
+
name: string;
|
|
6
|
+
ctx?: IContext;
|
|
7
|
+
sendEvent?: (payload: RumEvent) => void;
|
|
8
|
+
private prevPage?;
|
|
9
|
+
private pageMap;
|
|
10
|
+
setup(ctx: IContext, sendEvent: (payload: RumEvent) => void): void;
|
|
11
|
+
onChange: (route: Route<any>) => void;
|
|
12
|
+
sendPv: (page: IPage) => void;
|
|
13
|
+
private getViewName;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=pv.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expo config plugin for @arms/rum-reactnative.
|
|
3
|
+
*
|
|
4
|
+
* 在 app.config 中声明后,将 SDK 配置写入 `expoConfig.extra.rumSdk`,运行时可通过
|
|
5
|
+
* `Constants.expoConfig?.extra?.rumSdk` 读取,避免在 JS 入口硬编码 endpoint。
|
|
6
|
+
*
|
|
7
|
+
* app.config.ts 示例:
|
|
8
|
+
* plugins: [['@arms/rum-reactnative', { endpoint: '...', env: 'prod' }]]
|
|
9
|
+
*
|
|
10
|
+
* 仅做配置透传,不注入原生构建设置(podspec / gradle 已由 autolinking 处理)。
|
|
11
|
+
* 零运行时依赖,非 Expo 用户安装本包不会拉入 @expo/* 。
|
|
12
|
+
*/
|
|
13
|
+
/** 本插件触碰到的 expo config 切片,故意放宽以避免对 @expo/config-types 的硬依赖。 */
|
|
14
|
+
export interface RumExpoConfig {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
extra?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export interface RumSdkPluginProps {
|
|
19
|
+
/** ARMS 上报地址,可在控制台创建应用后获取 */
|
|
20
|
+
endpoint?: string;
|
|
21
|
+
/** 环境,默认 'prod' */
|
|
22
|
+
env?: 'prod' | 'gray' | 'pre' | 'daily' | 'local';
|
|
23
|
+
/** 应用版本号 */
|
|
24
|
+
version?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const withRumSdk: (config: RumExpoConfig, props?: RumSdkPluginProps) => RumExpoConfig;
|
|
27
|
+
export default withRumSdk;
|
|
28
|
+
//# sourceMappingURL=expoConfigPlugin.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IContext, IProcessor } from '@arms/rum-core';
|
|
2
|
+
export default class SessionProcessor implements IProcessor {
|
|
3
|
+
name: string;
|
|
4
|
+
ctx?: IContext;
|
|
5
|
+
private lastSessionId;
|
|
6
|
+
setup(ctx: IContext): void;
|
|
7
|
+
update: (e?: Event) => void;
|
|
8
|
+
process(ctx: IContext): import("@arms/rum-core").RumEvent;
|
|
9
|
+
private syncCrashContext;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=session-processor.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IContext, IReporter, Reporter, RumEventBundle } from '@arms/rum-core';
|
|
2
|
+
/**
|
|
3
|
+
* rn-app reporter
|
|
4
|
+
*/
|
|
5
|
+
declare class RNReporter extends Reporter implements IReporter {
|
|
6
|
+
name: string;
|
|
7
|
+
private appStateListener?;
|
|
8
|
+
constructor();
|
|
9
|
+
init(ctx: IContext): void;
|
|
10
|
+
onAppStateChanged: (nextAppState: string) => void;
|
|
11
|
+
request(ctx: IContext, bundle: RumEventBundle): Promise<void>;
|
|
12
|
+
/** 通过共享 emitter 通知崩溃采集器上报结果(成功则删文件,失败保留重试) */
|
|
13
|
+
private ackCrashes;
|
|
14
|
+
catchHandle: (err: any) => void;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
17
|
+
export default RNReporter;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IMonitorReporter, MonitorEventBundle } from '@arms/rum-core';
|
|
2
|
+
export declare class RNMonitorReporter implements IMonitorReporter {
|
|
3
|
+
private endpoint;
|
|
4
|
+
constructor(endpoint: string);
|
|
5
|
+
send(data: MonitorEventBundle[]): void;
|
|
6
|
+
private buildMonitorEndpoint;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=monitor-reporter.d.ts.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Shell } from '@arms/rum-core';
|
|
2
|
+
import * as collectors from './collector';
|
|
3
|
+
import { IRNConfig } from './types/client';
|
|
4
|
+
import { NavigationContainerRef } from './types';
|
|
5
|
+
declare const builtInCollectors: readonly (typeof collectors.PvCollector | typeof collectors.ExceptionCollector | typeof collectors.CrashCollector | typeof collectors.ApiCollector | typeof collectors.ActionCollector)[];
|
|
6
|
+
type CollectorName = (typeof builtInCollectors)[number]['prototype']['name'];
|
|
7
|
+
type CollectorMap = {
|
|
8
|
+
[K in CollectorName]: InstanceType<Extract<(typeof builtInCollectors)[number], {
|
|
9
|
+
prototype: {
|
|
10
|
+
name: K;
|
|
11
|
+
};
|
|
12
|
+
}>>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 对外导出 shell 层, 所有 shell 层模型的 API 设计约定:
|
|
16
|
+
* 1. API 命名空间按照 variables / functions / events 来组织
|
|
17
|
+
* 2. 事件(events)的命名格式为:on[Will|Did]VerbNoun?,参考 https://code.visualstudio.com/api/references/vscode-api#events
|
|
18
|
+
* 3. 基于 Disposable 模式,对于事件的绑定、快捷键的绑定函数,返回值则是解绑函数
|
|
19
|
+
*/
|
|
20
|
+
export declare class ArmsRum extends Shell {
|
|
21
|
+
version: string;
|
|
22
|
+
/**
|
|
23
|
+
* 初始化
|
|
24
|
+
*/
|
|
25
|
+
init(config: IRNConfig): this;
|
|
26
|
+
/**
|
|
27
|
+
* set config
|
|
28
|
+
*/
|
|
29
|
+
setConfig<T extends keyof IRNConfig>(key: T, value: IRNConfig[T]): void;
|
|
30
|
+
setConfig(value: IRNConfig): void;
|
|
31
|
+
/**
|
|
32
|
+
* 开启路由变化监听,自动采集 PV 数据
|
|
33
|
+
*
|
|
34
|
+
* 必须在 NavigationContainer 的 `onReady` 回调中调用,以确保
|
|
35
|
+
* navigationRef 已正确初始化。
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <NavigationContainer
|
|
40
|
+
* ref={navigationRef}
|
|
41
|
+
* onReady={() => {
|
|
42
|
+
* ArmsRum.startTrackingViews(navigationRef);
|
|
43
|
+
* }}
|
|
44
|
+
* >
|
|
45
|
+
* ...
|
|
46
|
+
* </NavigationContainer>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @param navigationRef - NavigationContainer 的 ref 引用
|
|
50
|
+
*/
|
|
51
|
+
startTrackingViews(navigationRef: NavigationContainerRef | any): void;
|
|
52
|
+
stopTrackingViews(): void;
|
|
53
|
+
getCollector<T extends CollectorName>(name: T): CollectorMap[T] | undefined;
|
|
54
|
+
}
|
|
55
|
+
declare const _default: ArmsRum;
|
|
56
|
+
export default _default;
|
|
57
|
+
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IConfiguration, ITracingOption } from '@arms/rum-core';
|
|
2
|
+
import { IApiBaseAttr } from '../utils/api';
|
|
3
|
+
export interface IPage {
|
|
4
|
+
id: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
params?: object;
|
|
8
|
+
}
|
|
9
|
+
export interface IRNConfig extends IConfiguration {
|
|
10
|
+
/**
|
|
11
|
+
* view.name 解析
|
|
12
|
+
*/
|
|
13
|
+
parseViewName?(url: string, page?: IPage): string;
|
|
14
|
+
/**
|
|
15
|
+
* resource.name 解析
|
|
16
|
+
*/
|
|
17
|
+
parseResourceName?(url: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* tracing 配置 'tracecontext' | 'b3' | 'b3multi' | 'jaeger';
|
|
20
|
+
*/
|
|
21
|
+
tracing?: boolean | ITracingOption;
|
|
22
|
+
/**
|
|
23
|
+
* request 自定义解析;
|
|
24
|
+
*/
|
|
25
|
+
evaluateApi?(request: any, response: any, error?: Error, xhr?: XMLHttpRequest): Promise<IApiBaseAttr>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 崩溃相关类型定义
|
|
3
|
+
*/
|
|
4
|
+
/** 崩溃上下文同步事件名 */
|
|
5
|
+
export declare const CRASH_CONTEXT_EVENT = "crash_context_change";
|
|
6
|
+
/** 崩溃上报确认事件名(reporter -> crash collector,用于 ack 后删除文件) */
|
|
7
|
+
export declare const CRASH_REPORT_ACK_EVENT = "crash_report_ack";
|
|
8
|
+
/**
|
|
9
|
+
* 挂在崩溃 RumEvent 上的瞬态字段名,携带 crash_id。
|
|
10
|
+
* reporter 上报前提取用于 ack、并在序列化前剥离,不会发送到后端。
|
|
11
|
+
*/
|
|
12
|
+
export declare const CRASH_ID_FIELD = "__rum_crash_id";
|
|
13
|
+
/** 崩溃上报确认事件负载 */
|
|
14
|
+
export interface CrashReportAck {
|
|
15
|
+
/** 本次上报包含的 crash_id 列表 */
|
|
16
|
+
crashIds: string[];
|
|
17
|
+
/** 上报是否成功(HTTP 2xx) */
|
|
18
|
+
success: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 崩溃上下文快照(session / view 变更时同步到原生侧)。
|
|
22
|
+
*/
|
|
23
|
+
export interface CrashContextSnapshot {
|
|
24
|
+
session_id?: string;
|
|
25
|
+
view_id?: string;
|
|
26
|
+
view_name?: string;
|
|
27
|
+
user_id?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 原生崩溃栈帧数据结构。
|
|
31
|
+
*/
|
|
32
|
+
export interface NativeCrashFrame {
|
|
33
|
+
library?: string;
|
|
34
|
+
symbol?: string;
|
|
35
|
+
address?: string;
|
|
36
|
+
/** 模块加载基址(Android NDK 提供,供后端结合 build_id 符号化) */
|
|
37
|
+
image_addr?: string;
|
|
38
|
+
offset?: string;
|
|
39
|
+
line?: number;
|
|
40
|
+
/** 截断标记帧:true 表示此帧为双侧截断的中间标记,非实际栈帧 */
|
|
41
|
+
truncated?: boolean;
|
|
42
|
+
/** 被省略的帧数(-1 表示未知总数,NDK 场景) */
|
|
43
|
+
omitted_count?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 原生崩溃数据结构(与原生侧 RumCrashReporter / CrashContextManager 写入的 JSON 对齐)。
|
|
47
|
+
* 仅声明 JS 层会用到的字段,未列出的字段会通过 snapshots 透传给后端。
|
|
48
|
+
*/
|
|
49
|
+
export interface NativeCrashData {
|
|
50
|
+
/** crash_id 可选,兼容旧版 NDK 崩溃文件(无 crash_id 字段) */
|
|
51
|
+
crash_id?: string;
|
|
52
|
+
timestamp?: number;
|
|
53
|
+
signal?: {
|
|
54
|
+
name?: string;
|
|
55
|
+
/** NDK 写入为数字(si_code),Java 侧可能为字符串 */
|
|
56
|
+
code?: string | number;
|
|
57
|
+
fault_address?: string;
|
|
58
|
+
/** NDK 信号编号 */
|
|
59
|
+
number?: number;
|
|
60
|
+
};
|
|
61
|
+
exception?: {
|
|
62
|
+
type?: string;
|
|
63
|
+
class_name?: string;
|
|
64
|
+
message?: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 顶层 frames(NDK 崩溃格式)。
|
|
68
|
+
* NDK 崩溃 JSON 的 frames 在顶层,不在 crashed_thread 内。
|
|
69
|
+
*/
|
|
70
|
+
frames?: NativeCrashFrame[] | string[];
|
|
71
|
+
crashed_thread?: {
|
|
72
|
+
id?: number | string;
|
|
73
|
+
/** frames 兼容新版对象格式和旧版字符串格式 */
|
|
74
|
+
frames?: NativeCrashFrame[] | string[];
|
|
75
|
+
};
|
|
76
|
+
/** NDK 崩溃进程 ID */
|
|
77
|
+
pid?: number;
|
|
78
|
+
/** NDK 崩溃线程 ID */
|
|
79
|
+
tid?: number;
|
|
80
|
+
/** NDK 崩溃架构(arm64/arm/x86_64/x86) */
|
|
81
|
+
arch?: string;
|
|
82
|
+
binary_images?: unknown[];
|
|
83
|
+
device?: Record<string, unknown>;
|
|
84
|
+
registers?: Record<string, unknown>;
|
|
85
|
+
app?: Record<string, unknown>;
|
|
86
|
+
context?: {
|
|
87
|
+
session_id?: string;
|
|
88
|
+
view_id?: string;
|
|
89
|
+
view_name?: string;
|
|
90
|
+
user_id?: string;
|
|
91
|
+
};
|
|
92
|
+
/** 崩溃机制信息(iOS normalizeKSCrashReport / Android getPendingCrashes 写入) */
|
|
93
|
+
mechanism?: Record<string, unknown>;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=crash.d.ts.map
|