@lark-apaas/observable 1.0.2-alpha.4 → 1.0.3-alpha.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/dist/index.cjs +1068 -1255
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1043 -1218
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -13,8 +13,15 @@ declare class AppOTelSDK {
|
|
|
13
13
|
/**
|
|
14
14
|
* [框架专用 API] 开启一个根 Span (Root Span)
|
|
15
15
|
* 该方法专供 Middleware/Interceptor 使用
|
|
16
|
+
* wrapper 形式
|
|
16
17
|
*/
|
|
17
18
|
startContext(headers: Record<string, string>, name: string, fn: (span: Span) => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* [框架专用 API] 开启一个根 Span (Root Span)
|
|
21
|
+
* 该方法专供 Middleware/Interceptor 使用
|
|
22
|
+
* wrapper 形式
|
|
23
|
+
*/
|
|
24
|
+
startRootTrace(headers: Record<string, string>, name: string): Span;
|
|
18
25
|
/**
|
|
19
26
|
* [用户专用 API] 手动打点 (Child Span)
|
|
20
27
|
* 用户在 Service 中调用此方法,会自动挂载到 Middleware 创建的 Root Span 下
|
|
@@ -24,6 +31,17 @@ declare class AppOTelSDK {
|
|
|
24
31
|
* [Log API] 自动关联 TraceContext
|
|
25
32
|
*/
|
|
26
33
|
log(level: string, message: string, extra?: Record<string, unknown>): void;
|
|
34
|
+
/**
|
|
35
|
+
* 启动 Span 的工厂函数
|
|
36
|
+
* @param {string} name - Span 名称
|
|
37
|
+
* @param {Object} [parentSpan] - (可选) 父 Span 对象
|
|
38
|
+
*/
|
|
39
|
+
startTrace(name: string, parentSpan?: Span): Span;
|
|
40
|
+
/**
|
|
41
|
+
* 丢弃 Span 的工厂函数
|
|
42
|
+
* @param {Span} span - 要被丢弃的 Span 对象
|
|
43
|
+
*/
|
|
44
|
+
static dropTraceSpan(span: Span): void;
|
|
27
45
|
/**
|
|
28
46
|
* [框架专用] 强制刷新
|
|
29
47
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,15 @@ declare class AppOTelSDK {
|
|
|
13
13
|
/**
|
|
14
14
|
* [框架专用 API] 开启一个根 Span (Root Span)
|
|
15
15
|
* 该方法专供 Middleware/Interceptor 使用
|
|
16
|
+
* wrapper 形式
|
|
16
17
|
*/
|
|
17
18
|
startContext(headers: Record<string, string>, name: string, fn: (span: Span) => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* [框架专用 API] 开启一个根 Span (Root Span)
|
|
21
|
+
* 该方法专供 Middleware/Interceptor 使用
|
|
22
|
+
* wrapper 形式
|
|
23
|
+
*/
|
|
24
|
+
startRootTrace(headers: Record<string, string>, name: string): Span;
|
|
18
25
|
/**
|
|
19
26
|
* [用户专用 API] 手动打点 (Child Span)
|
|
20
27
|
* 用户在 Service 中调用此方法,会自动挂载到 Middleware 创建的 Root Span 下
|
|
@@ -24,6 +31,17 @@ declare class AppOTelSDK {
|
|
|
24
31
|
* [Log API] 自动关联 TraceContext
|
|
25
32
|
*/
|
|
26
33
|
log(level: string, message: string, extra?: Record<string, unknown>): void;
|
|
34
|
+
/**
|
|
35
|
+
* 启动 Span 的工厂函数
|
|
36
|
+
* @param {string} name - Span 名称
|
|
37
|
+
* @param {Object} [parentSpan] - (可选) 父 Span 对象
|
|
38
|
+
*/
|
|
39
|
+
startTrace(name: string, parentSpan?: Span): Span;
|
|
40
|
+
/**
|
|
41
|
+
* 丢弃 Span 的工厂函数
|
|
42
|
+
* @param {Span} span - 要被丢弃的 Span 对象
|
|
43
|
+
*/
|
|
44
|
+
static dropTraceSpan(span: Span): void;
|
|
27
45
|
/**
|
|
28
46
|
* [框架专用] 强制刷新
|
|
29
47
|
*/
|