spy-client 2.1.14 → 2.2.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/.travis.yml +7 -4
- package/AGENTS.md +132 -0
- package/README.md +29 -18
- package/dist/head/base.d.ts +27 -25
- package/dist/head/error.d.ts +6 -6
- package/dist/head/observer.d.ts +5 -5
- package/dist/head/whitescreen.d.ts +6 -6
- package/dist/lib/data.d.ts +6 -6
- package/dist/lib/huffman.d.ts +9 -9
- package/dist/lib/interface.d.ts +209 -209
- package/dist/lib/spyHeadInterface.d.ts +36 -28
- package/dist/lib/util.d.ts +22 -22
- package/dist/module/fid.d.ts +15 -15
- package/dist/module/layoutShift.d.ts +18 -18
- package/dist/module/lcp.d.ts +17 -17
- package/dist/module/longtask.d.ts +46 -46
- package/dist/module/memory.d.ts +11 -11
- package/dist/module/navigatorInfo.d.ts +9 -9
- package/dist/module/resource.d.ts +39 -39
- package/dist/module/timing.d.ts +11 -11
- package/dist/module/tti.d.ts +19 -19
- package/dist/spy-client-basic.d.ts +118 -104
- package/dist/spy-client-basic.esm.js +298 -294
- package/dist/spy-client-basic.iife.js +298 -294
- package/dist/spy-client-basic.iife.min.js +1 -1
- package/dist/spy-client-basic.js +298 -294
- package/dist/spy-client-basic.min.js +1 -1
- package/dist/spy-client-basic.mjs +298 -294
- package/dist/spy-client.d.ts +32 -32
- package/dist/spy-client.esm.js +1430 -1419
- package/dist/spy-client.iife.js +1430 -1419
- package/dist/spy-client.iife.min.js +1 -1
- package/dist/spy-client.js +1430 -1419
- package/dist/spy-client.min.js +1 -1
- package/dist/spy-client.mjs +1430 -1419
- package/dist/spy-head.d.ts +6 -6
- package/dist/spy-head.js +359 -355
- package/dist/spy-head.min.js +1 -1
- package/dist/spy-local-cache.d.ts +18 -18
- package/dist/spy-local-cache.js +718 -711
- package/dist/spy-local-cache.min.js +1 -1
- package/package.json +26 -73
- package/test-results/.last-run.json +4 -0
- package/karma.conf.js +0 -111
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Longtask
|
|
3
|
-
* @author kaivean
|
|
4
|
-
*/
|
|
5
|
-
import { Module, FSPLongtaskCB, LCPLongtaskCB, LoadLongtaskCB, PageLongtaskCB } from '../lib/interface';
|
|
6
|
-
export interface LongtaskData {
|
|
7
|
-
longtaskTime?: number;
|
|
8
|
-
longtaskRate?: number;
|
|
9
|
-
longtaskNum?: number;
|
|
10
|
-
totalTime?: number;
|
|
11
|
-
longtaskIframeTime?: number;
|
|
12
|
-
longtaskIframeNum?: number;
|
|
13
|
-
longtaskIframeRate?: number;
|
|
14
|
-
iframeLongtasks?: {
|
|
15
|
-
[propName: string]: number[] | undefined;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export default class Longtask implements Module {
|
|
19
|
-
private lts;
|
|
20
|
-
private observer;
|
|
21
|
-
private fspCB;
|
|
22
|
-
private lcpCB;
|
|
23
|
-
private loadCB;
|
|
24
|
-
private pageCB;
|
|
25
|
-
private onceLeave;
|
|
26
|
-
constructor();
|
|
27
|
-
check(): any;
|
|
28
|
-
listenFSPLongTask(cb: FSPLongtaskCB): void;
|
|
29
|
-
listenLCPLongTask(cb: LCPLongtaskCB): void;
|
|
30
|
-
listenLoadLongTask(cb: LoadLongtaskCB): void;
|
|
31
|
-
listenPageLongTask(cb: PageLongtaskCB): void;
|
|
32
|
-
load(): void;
|
|
33
|
-
leave(): void;
|
|
34
|
-
destroy(): void;
|
|
35
|
-
getStatData(finalTime: number): {
|
|
36
|
-
num: number;
|
|
37
|
-
time: number;
|
|
38
|
-
tbt: number;
|
|
39
|
-
totalTime: number;
|
|
40
|
-
rate: number;
|
|
41
|
-
iframeTime: number;
|
|
42
|
-
iframeNum: number;
|
|
43
|
-
iframeRate: number;
|
|
44
|
-
iframeLongtasks: any;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file Longtask
|
|
3
|
+
* @author kaivean
|
|
4
|
+
*/
|
|
5
|
+
import { Module, FSPLongtaskCB, LCPLongtaskCB, LoadLongtaskCB, PageLongtaskCB } from '../lib/interface';
|
|
6
|
+
export interface LongtaskData {
|
|
7
|
+
longtaskTime?: number;
|
|
8
|
+
longtaskRate?: number;
|
|
9
|
+
longtaskNum?: number;
|
|
10
|
+
totalTime?: number;
|
|
11
|
+
longtaskIframeTime?: number;
|
|
12
|
+
longtaskIframeNum?: number;
|
|
13
|
+
longtaskIframeRate?: number;
|
|
14
|
+
iframeLongtasks?: {
|
|
15
|
+
[propName: string]: number[] | undefined;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export default class Longtask implements Module {
|
|
19
|
+
private lts;
|
|
20
|
+
private observer;
|
|
21
|
+
private fspCB;
|
|
22
|
+
private lcpCB;
|
|
23
|
+
private loadCB;
|
|
24
|
+
private pageCB;
|
|
25
|
+
private onceLeave;
|
|
26
|
+
constructor();
|
|
27
|
+
check(): any;
|
|
28
|
+
listenFSPLongTask(cb: FSPLongtaskCB): void;
|
|
29
|
+
listenLCPLongTask(cb: LCPLongtaskCB): void;
|
|
30
|
+
listenLoadLongTask(cb: LoadLongtaskCB): void;
|
|
31
|
+
listenPageLongTask(cb: PageLongtaskCB): void;
|
|
32
|
+
load(): void;
|
|
33
|
+
leave(): void;
|
|
34
|
+
destroy(): void;
|
|
35
|
+
getStatData(finalTime: number): {
|
|
36
|
+
num: number;
|
|
37
|
+
time: number;
|
|
38
|
+
tbt: number;
|
|
39
|
+
totalTime: number;
|
|
40
|
+
rate: number;
|
|
41
|
+
iframeTime: number;
|
|
42
|
+
iframeNum: number;
|
|
43
|
+
iframeRate: number;
|
|
44
|
+
iframeLongtasks: any;
|
|
45
|
+
};
|
|
46
|
+
}
|
package/dist/module/memory.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Memory
|
|
3
|
-
* @author kaivean
|
|
4
|
-
*/
|
|
5
|
-
import { Module, MemoryCB } from '../lib/interface';
|
|
6
|
-
export default class Memory implements Module {
|
|
7
|
-
private cb;
|
|
8
|
-
private onceLeave;
|
|
9
|
-
listenMemory(cb: MemoryCB): void;
|
|
10
|
-
leave(): void;
|
|
11
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file Memory
|
|
3
|
+
* @author kaivean
|
|
4
|
+
*/
|
|
5
|
+
import { Module, MemoryCB } from '../lib/interface';
|
|
6
|
+
export default class Memory implements Module {
|
|
7
|
+
private cb;
|
|
8
|
+
private onceLeave;
|
|
9
|
+
listenMemory(cb: MemoryCB): void;
|
|
10
|
+
leave(): void;
|
|
11
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file NavigatorInfo
|
|
3
|
-
* @author kaivean
|
|
4
|
-
*/
|
|
5
|
-
import { Module, NavigatorInfoMetric } from '../lib/interface';
|
|
6
|
-
export default class NavigatorInfo implements Module {
|
|
7
|
-
getNavigatorInfo(): NavigatorInfoMetric;
|
|
8
|
-
load(): void;
|
|
9
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file NavigatorInfo
|
|
3
|
+
* @author kaivean
|
|
4
|
+
*/
|
|
5
|
+
import { Module, NavigatorInfoMetric } from '../lib/interface';
|
|
6
|
+
export default class NavigatorInfo implements Module {
|
|
7
|
+
getNavigatorInfo(): NavigatorInfoMetric;
|
|
8
|
+
load(): void;
|
|
9
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Module, ResourceCB, ResourceErrorCB, ResOption, BigImgOption, HttpResOption, SlowOption } from '../lib/interface';
|
|
2
|
-
export default class Resource implements Module {
|
|
3
|
-
private cb;
|
|
4
|
-
private bigImgCB;
|
|
5
|
-
private httpResCB;
|
|
6
|
-
private slowResCB;
|
|
7
|
-
private resOption;
|
|
8
|
-
private bigImgOption;
|
|
9
|
-
private httpResOption;
|
|
10
|
-
private slowOption;
|
|
11
|
-
private trigger;
|
|
12
|
-
private readonly jsList;
|
|
13
|
-
private readonly cssList;
|
|
14
|
-
private readonly imgList;
|
|
15
|
-
private readonly fontList;
|
|
16
|
-
private readonly hostList;
|
|
17
|
-
private readonly bigImgList;
|
|
18
|
-
private readonly httpResList;
|
|
19
|
-
private readonly slowList;
|
|
20
|
-
constructor();
|
|
21
|
-
check(): (type: string) => PerformanceEntryList;
|
|
22
|
-
listenResource(cb: ResourceCB, option?: ResOption): void;
|
|
23
|
-
listenBigImg(cb: ResourceErrorCB, option?: BigImgOption): void;
|
|
24
|
-
listenHttpResource(cb: ResourceErrorCB, option?: HttpResOption): void;
|
|
25
|
-
listenSlowResource(cb: ResourceErrorCB, option?: SlowOption): void;
|
|
26
|
-
report(): void;
|
|
27
|
-
load(): void;
|
|
28
|
-
leave(): void;
|
|
29
|
-
private push;
|
|
30
|
-
private pushWithHost;
|
|
31
|
-
private collectHttpResInHttps;
|
|
32
|
-
private addScript;
|
|
33
|
-
private addResFromCss;
|
|
34
|
-
private addLink;
|
|
35
|
-
private addImg;
|
|
36
|
-
private handleTimings;
|
|
37
|
-
private getNumAndSize;
|
|
38
|
-
private getMetric;
|
|
39
|
-
}
|
|
1
|
+
import { Module, ResourceCB, ResourceErrorCB, ResOption, BigImgOption, HttpResOption, SlowOption } from '../lib/interface';
|
|
2
|
+
export default class Resource implements Module {
|
|
3
|
+
private cb;
|
|
4
|
+
private bigImgCB;
|
|
5
|
+
private httpResCB;
|
|
6
|
+
private slowResCB;
|
|
7
|
+
private resOption;
|
|
8
|
+
private bigImgOption;
|
|
9
|
+
private httpResOption;
|
|
10
|
+
private slowOption;
|
|
11
|
+
private trigger;
|
|
12
|
+
private readonly jsList;
|
|
13
|
+
private readonly cssList;
|
|
14
|
+
private readonly imgList;
|
|
15
|
+
private readonly fontList;
|
|
16
|
+
private readonly hostList;
|
|
17
|
+
private readonly bigImgList;
|
|
18
|
+
private readonly httpResList;
|
|
19
|
+
private readonly slowList;
|
|
20
|
+
constructor();
|
|
21
|
+
check(): (type: string) => PerformanceEntryList;
|
|
22
|
+
listenResource(cb: ResourceCB, option?: ResOption): void;
|
|
23
|
+
listenBigImg(cb: ResourceErrorCB, option?: BigImgOption): void;
|
|
24
|
+
listenHttpResource(cb: ResourceErrorCB, option?: HttpResOption): void;
|
|
25
|
+
listenSlowResource(cb: ResourceErrorCB, option?: SlowOption): void;
|
|
26
|
+
report(): void;
|
|
27
|
+
load(): void;
|
|
28
|
+
leave(): void;
|
|
29
|
+
private push;
|
|
30
|
+
private pushWithHost;
|
|
31
|
+
private collectHttpResInHttps;
|
|
32
|
+
private addScript;
|
|
33
|
+
private addResFromCss;
|
|
34
|
+
private addLink;
|
|
35
|
+
private addImg;
|
|
36
|
+
private handleTimings;
|
|
37
|
+
private getNumAndSize;
|
|
38
|
+
private getMetric;
|
|
39
|
+
}
|
package/dist/module/timing.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file LCP
|
|
3
|
-
* @author kaivean
|
|
4
|
-
*/
|
|
5
|
-
import { Module, TimingCB } from '../lib/interface';
|
|
6
|
-
export default class Timing implements Module {
|
|
7
|
-
private cb;
|
|
8
|
-
listenTiming(cb: TimingCB): void;
|
|
9
|
-
load(): void;
|
|
10
|
-
private getMetric;
|
|
11
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file LCP
|
|
3
|
+
* @author kaivean
|
|
4
|
+
*/
|
|
5
|
+
import { Module, TimingCB } from '../lib/interface';
|
|
6
|
+
export default class Timing implements Module {
|
|
7
|
+
private cb;
|
|
8
|
+
listenTiming(cb: TimingCB): void;
|
|
9
|
+
load(): void;
|
|
10
|
+
private getMetric;
|
|
11
|
+
}
|
package/dist/module/tti.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Module, TTICB, TTIOption } from '../lib/interface';
|
|
2
|
-
export default class TTI implements Module {
|
|
3
|
-
private lastLongTask;
|
|
4
|
-
private observer;
|
|
5
|
-
private ttiTimer;
|
|
6
|
-
private stopLongTaskTimeoutId;
|
|
7
|
-
private cb;
|
|
8
|
-
private interval;
|
|
9
|
-
private filterRequest;
|
|
10
|
-
constructor();
|
|
11
|
-
check(): any;
|
|
12
|
-
listenTTI(cb: TTICB, option?: TTIOption): void;
|
|
13
|
-
load(): void;
|
|
14
|
-
ttiCheck(): void;
|
|
15
|
-
observerCallback(list: PerformanceObserverEntryList): void;
|
|
16
|
-
stopObserveLongTask(): void;
|
|
17
|
-
getNetworkSilenceAt(): number | false;
|
|
18
|
-
private observeLongtask;
|
|
19
|
-
}
|
|
1
|
+
import { Module, TTICB, TTIOption } from '../lib/interface';
|
|
2
|
+
export default class TTI implements Module {
|
|
3
|
+
private lastLongTask;
|
|
4
|
+
private observer;
|
|
5
|
+
private ttiTimer;
|
|
6
|
+
private stopLongTaskTimeoutId;
|
|
7
|
+
private cb;
|
|
8
|
+
private interval;
|
|
9
|
+
private filterRequest;
|
|
10
|
+
constructor();
|
|
11
|
+
check(): any;
|
|
12
|
+
listenTTI(cb: TTICB, option?: TTIOption): void;
|
|
13
|
+
load(): void;
|
|
14
|
+
ttiCheck(): void;
|
|
15
|
+
observerCallback(list: PerformanceObserverEntryList): void;
|
|
16
|
+
stopObserveLongTask(): void;
|
|
17
|
+
getNetworkSilenceAt(): number | false;
|
|
18
|
+
private observeLongtask;
|
|
19
|
+
}
|
|
@@ -1,104 +1,118 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file SpyClient
|
|
3
|
-
* @author kaivean
|
|
4
|
-
*/
|
|
5
|
-
import { SpyClientOption } from './lib/interface';
|
|
6
|
-
interface Option {
|
|
7
|
-
/**
|
|
8
|
-
* 指标组,它的每个key就是指标名称(英文表示),在平台对应分组添加该指标名称便能实现自动统计
|
|
9
|
-
*/
|
|
10
|
-
info: object;
|
|
11
|
-
/**
|
|
12
|
-
* 维度信息对象,它的每个字段就是一个维度名称(英文表示),在平台对应分组添加该维度名称便能实现自动统计
|
|
13
|
-
*/
|
|
14
|
-
dim?: object;
|
|
15
|
-
/**
|
|
16
|
-
* 分组,默认:common
|
|
17
|
-
*/
|
|
18
|
-
group?: string;
|
|
19
|
-
/**
|
|
20
|
-
* 抽样,会覆盖全局抽样配置,默认是 1,取值从[0, 1]
|
|
21
|
-
*/
|
|
22
|
-
sample?: number;
|
|
23
|
-
/**
|
|
24
|
-
* 日志服务器,默认是webb服务器,尾部需要加?
|
|
25
|
-
*/
|
|
26
|
-
logServer?: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file SpyClient
|
|
3
|
+
* @author kaivean
|
|
4
|
+
*/
|
|
5
|
+
import { SpyClientOption } from './lib/interface';
|
|
6
|
+
interface Option {
|
|
7
|
+
/**
|
|
8
|
+
* 指标组,它的每个key就是指标名称(英文表示),在平台对应分组添加该指标名称便能实现自动统计
|
|
9
|
+
*/
|
|
10
|
+
info: object;
|
|
11
|
+
/**
|
|
12
|
+
* 维度信息对象,它的每个字段就是一个维度名称(英文表示),在平台对应分组添加该维度名称便能实现自动统计
|
|
13
|
+
*/
|
|
14
|
+
dim?: object;
|
|
15
|
+
/**
|
|
16
|
+
* 分组,默认:common
|
|
17
|
+
*/
|
|
18
|
+
group?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 抽样,会覆盖全局抽样配置,默认是 1,取值从[0, 1]
|
|
21
|
+
*/
|
|
22
|
+
sample?: number;
|
|
23
|
+
/**
|
|
24
|
+
* 日志服务器,默认是webb服务器,尾部需要加?
|
|
25
|
+
*/
|
|
26
|
+
logServer?: string;
|
|
27
|
+
/**
|
|
28
|
+
* log ID
|
|
29
|
+
*/
|
|
30
|
+
lid?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ErrorInfo {
|
|
33
|
+
/**
|
|
34
|
+
* 错误唯一标识,平台会统计该错误唯一标识的数量
|
|
35
|
+
*/
|
|
36
|
+
[propName: string]: any;
|
|
37
|
+
}
|
|
38
|
+
interface ErrorOption {
|
|
39
|
+
/**
|
|
40
|
+
* 错误信息对象,它必须有msg字段,是错误唯一标识,其他字段可用户随意添加用来补充错误信息
|
|
41
|
+
*/
|
|
42
|
+
info?: ErrorInfo;
|
|
43
|
+
/**
|
|
44
|
+
* 维度信息对象,它的每个字段就是一个维度名称(英文表示),在平台对应分组添加该维度名称便能实现自动统计
|
|
45
|
+
*/
|
|
46
|
+
dim?: object;
|
|
47
|
+
/**
|
|
48
|
+
* 分组,默认:common
|
|
49
|
+
*/
|
|
50
|
+
group?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 抽样,默认是 1,取值从[0, 1],该抽样会覆盖实例初始化时的抽样配置
|
|
53
|
+
*/
|
|
54
|
+
sample?: number;
|
|
55
|
+
/**
|
|
56
|
+
* log ID
|
|
57
|
+
*/
|
|
58
|
+
lid?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 业务拓展信息
|
|
61
|
+
*/
|
|
62
|
+
ext?: any;
|
|
63
|
+
}
|
|
64
|
+
interface SpyClientInnerOption extends SpyClientOption {
|
|
65
|
+
logServer: string;
|
|
66
|
+
}
|
|
67
|
+
export default class SpyClient {
|
|
68
|
+
sample: any;
|
|
69
|
+
markCache: any;
|
|
70
|
+
option: SpyClientInnerOption;
|
|
71
|
+
constructor(option: SpyClientOption);
|
|
72
|
+
handle(logItem: any): any;
|
|
73
|
+
send(data: any, post?: boolean): void;
|
|
74
|
+
check(query: any): boolean;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @param option 配置
|
|
78
|
+
*/
|
|
79
|
+
sendPerf(option: Option): void;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @param option 错误配置项
|
|
83
|
+
*/
|
|
84
|
+
sendExcept(option: ErrorOption): void;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @param option 配置
|
|
88
|
+
*/
|
|
89
|
+
sendDist(option: Option): void;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @param option 配置
|
|
93
|
+
*/
|
|
94
|
+
sendCount(option: Option): void;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @param e 错误实例
|
|
98
|
+
* @param option 错误配置项
|
|
99
|
+
*/
|
|
100
|
+
sendExceptForError(e: Error, option: ErrorOption): void;
|
|
101
|
+
startMark(sign: string): void;
|
|
102
|
+
endMark(sign: string): number;
|
|
103
|
+
clearMark(sign: string): void;
|
|
104
|
+
getAllMark(): {
|
|
105
|
+
[propName: string]: number;
|
|
106
|
+
};
|
|
107
|
+
clearAllMark(): void;
|
|
108
|
+
/**
|
|
109
|
+
* sendPost能以post请求发送,可以承接多个日志项,上报内容size可以提升,但没有前端校验
|
|
110
|
+
* send(data, true) 也能以post请求发送,但是会有严格校验
|
|
111
|
+
* 要求:发送的多条日志必须是同一个pid,同一类型type,同一分组group
|
|
112
|
+
* @param data 日志项或者日志项数组
|
|
113
|
+
*/
|
|
114
|
+
sendPost(data: any): void;
|
|
115
|
+
protected request(url: string, data?: any): void;
|
|
116
|
+
protected fetch(url: string, data: any): void;
|
|
117
|
+
}
|
|
118
|
+
export {};
|