@be-link/cls-logger 1.0.11 → 1.0.12
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 +430 -68
- package/dist/ClsLoggerCore.d.ts +37 -5
- package/dist/ClsLoggerCore.d.ts.map +1 -1
- package/dist/index.esm.js +379 -62
- package/dist/index.js +379 -62
- package/dist/index.umd.js +379 -62
- package/dist/mini/behaviorMonitor.d.ts.map +1 -1
- package/dist/mini/deviceInfo.d.ts.map +1 -1
- package/dist/mini/errorMonitor.d.ts.map +1 -1
- package/dist/mini.esm.js +278 -49
- package/dist/mini.js +278 -49
- package/dist/types.d.ts +41 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/web/deviceInfo.d.ts.map +1 -1
- package/dist/web/errorMonitor.d.ts.map +1 -1
- package/dist/web/performanceMonitor.d.ts.map +1 -1
- package/dist/web.esm.js +303 -38
- package/dist/web.js +303 -38
- package/package.json +1 -1
package/dist/mini.js
CHANGED
|
@@ -201,6 +201,11 @@ class ClsLoggerCore {
|
|
|
201
201
|
this.batchTimerDueAt = null;
|
|
202
202
|
this.initTs = 0;
|
|
203
203
|
this.startupDelayMs = 0;
|
|
204
|
+
this.startupMaxSize = 0; // 启动窗口内的 maxSize,0 表示使用默认计算值
|
|
205
|
+
this.useIdleCallback = false;
|
|
206
|
+
this.idleTimeout = 3000;
|
|
207
|
+
this.pendingIdleCallback = null; // requestIdleCallback 的 id
|
|
208
|
+
this.visibilityCleanup = null;
|
|
204
209
|
// 参考文档:失败缓存 + 重试
|
|
205
210
|
this.failedCacheKey = 'cls_failed_logs';
|
|
206
211
|
this.failedCacheMax = 200;
|
|
@@ -224,7 +229,7 @@ class ClsLoggerCore {
|
|
|
224
229
|
}
|
|
225
230
|
return 'browser';
|
|
226
231
|
}
|
|
227
|
-
init(options) {
|
|
232
|
+
async init(options) {
|
|
228
233
|
this.initTs = Date.now();
|
|
229
234
|
const topicId = options?.tencentCloud?.topicID ?? options?.topic_id ?? options?.topicID ?? this.topicId;
|
|
230
235
|
const endpoint = options?.tencentCloud?.endpoint ?? options?.endpoint ?? this.endpoint;
|
|
@@ -233,7 +238,7 @@ class ClsLoggerCore {
|
|
|
233
238
|
if (!topicId) {
|
|
234
239
|
// eslint-disable-next-line no-console
|
|
235
240
|
console.warn('ClsLogger.init 没有传 topicID/topic_id');
|
|
236
|
-
return;
|
|
241
|
+
return false;
|
|
237
242
|
}
|
|
238
243
|
const nextEnvType = options.envType ?? this.detectEnvType();
|
|
239
244
|
// envType/endpoint/retryTimes 变化时:重置 client(以及可能的 sdk)
|
|
@@ -270,15 +275,21 @@ class ClsLoggerCore {
|
|
|
270
275
|
this.batchMaxSize = options.batch?.maxSize ?? this.batchMaxSize;
|
|
271
276
|
this.batchIntervalMs = options.batch?.intervalMs ?? this.batchIntervalMs;
|
|
272
277
|
this.startupDelayMs = options.batch?.startupDelayMs ?? this.startupDelayMs;
|
|
278
|
+
this.useIdleCallback = options.batch?.useIdleCallback ?? this.useIdleCallback;
|
|
279
|
+
this.idleTimeout = options.batch?.idleTimeout ?? this.idleTimeout;
|
|
280
|
+
// startupMaxSize:启动窗口内的队列阈值,默认为 maxSize * 10(至少 200)
|
|
281
|
+
this.startupMaxSize = options.batch?.startupMaxSize ?? Math.max(this.batchMaxSize * 10, 200);
|
|
273
282
|
this.failedCacheKey = options.failedCacheKey ?? this.failedCacheKey;
|
|
274
283
|
this.failedCacheMax = options.failedCacheMax ?? this.failedCacheMax;
|
|
275
284
|
// 预热(避免首条日志触发 import/初始化开销)
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
285
|
+
const sdkReadyPromise = this.getInstance()
|
|
286
|
+
.then(() => true)
|
|
287
|
+
.catch(() => false);
|
|
279
288
|
if (this.enabled) {
|
|
280
289
|
// 启动时尝试发送失败缓存
|
|
281
290
|
this.flushFailed();
|
|
291
|
+
// 添加页面可见性监听(确保页面关闭时数据不丢失)
|
|
292
|
+
this.setupVisibilityListener();
|
|
282
293
|
// 初始化后立即启动请求监听
|
|
283
294
|
this.startRequestMonitor(options.requestMonitor);
|
|
284
295
|
// 初始化后立即启动错误监控/性能监控
|
|
@@ -287,6 +298,7 @@ class ClsLoggerCore {
|
|
|
287
298
|
// 初始化后立即启动行为埋点(PV/UV/点击)
|
|
288
299
|
this.startBehaviorMonitor(options.behaviorMonitor);
|
|
289
300
|
}
|
|
301
|
+
return sdkReadyPromise;
|
|
290
302
|
}
|
|
291
303
|
getBaseFields() {
|
|
292
304
|
let auto = undefined;
|
|
@@ -315,6 +327,96 @@ class ClsLoggerCore {
|
|
|
315
327
|
return auto;
|
|
316
328
|
return undefined;
|
|
317
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* 设置页面可见性监听
|
|
332
|
+
* - visibilitychange: 页面隐藏时使用 sendBeacon 发送队列
|
|
333
|
+
* - pagehide: 作为移动端 fallback
|
|
334
|
+
*/
|
|
335
|
+
setupVisibilityListener() {
|
|
336
|
+
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
337
|
+
return;
|
|
338
|
+
// 避免重复监听
|
|
339
|
+
if (this.visibilityCleanup)
|
|
340
|
+
return;
|
|
341
|
+
const handleVisibilityChange = () => {
|
|
342
|
+
if (document.visibilityState === 'hidden') {
|
|
343
|
+
// 使用微任务延迟 flush,确保 web-vitals 等第三方库的 visibilitychange 回调先执行
|
|
344
|
+
// 这样 LCP/CLS/INP 等指标能先入队,再被 flush 发送
|
|
345
|
+
// 注意:queueMicrotask 比 setTimeout(0) 更可靠,不会被延迟太久
|
|
346
|
+
queueMicrotask(() => {
|
|
347
|
+
this.flushBatchSync();
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
const handlePageHide = () => {
|
|
352
|
+
// pagehide 不能延迟,因为浏览器可能立即关闭页面
|
|
353
|
+
// 但 pagehide 通常在 visibilitychange 之后触发,此时队列应该已经包含 web-vitals 指标
|
|
354
|
+
this.flushBatchSync();
|
|
355
|
+
};
|
|
356
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
357
|
+
window.addEventListener('pagehide', handlePageHide);
|
|
358
|
+
this.visibilityCleanup = () => {
|
|
359
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
360
|
+
window.removeEventListener('pagehide', handlePageHide);
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* 同步发送内存队列(使用 sendBeacon)
|
|
365
|
+
* - 用于页面关闭时确保数据发送
|
|
366
|
+
* - sendBeacon 不可用时降级为缓存到 localStorage
|
|
367
|
+
*/
|
|
368
|
+
flushBatchSync() {
|
|
369
|
+
if (this.memoryQueue.length === 0)
|
|
370
|
+
return;
|
|
371
|
+
// 清除定时器
|
|
372
|
+
if (this.batchTimer) {
|
|
373
|
+
try {
|
|
374
|
+
if (this.useIdleCallback && typeof cancelIdleCallback !== 'undefined') {
|
|
375
|
+
cancelIdleCallback(this.batchTimer);
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
clearTimeout(this.batchTimer);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
catch {
|
|
382
|
+
// ignore
|
|
383
|
+
}
|
|
384
|
+
this.batchTimer = null;
|
|
385
|
+
}
|
|
386
|
+
this.batchTimerDueAt = null;
|
|
387
|
+
const logs = [...this.memoryQueue];
|
|
388
|
+
this.memoryQueue = [];
|
|
389
|
+
// 优先使用 sendBeacon(页面关闭时可靠发送)
|
|
390
|
+
if (typeof navigator !== 'undefined' && typeof navigator.sendBeacon === 'function') {
|
|
391
|
+
try {
|
|
392
|
+
const payload = this.buildSendBeaconPayload(logs);
|
|
393
|
+
const blob = new Blob([payload], { type: 'application/json' });
|
|
394
|
+
const url = `${this.endpoint}/structuredlog?topic_id=${this.topicId}`;
|
|
395
|
+
const success = navigator.sendBeacon(url, blob);
|
|
396
|
+
if (!success) {
|
|
397
|
+
// sendBeacon 返回 false 时,降级缓存
|
|
398
|
+
this.cacheFailedReportLogs(logs);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
catch {
|
|
402
|
+
this.cacheFailedReportLogs(logs);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
// 不支持 sendBeacon,降级缓存到 localStorage
|
|
407
|
+
this.cacheFailedReportLogs(logs);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* 构建 sendBeacon 的 payload
|
|
412
|
+
*/
|
|
413
|
+
buildSendBeaconPayload(logs) {
|
|
414
|
+
const logList = logs.map((log) => this.buildReportFields(log));
|
|
415
|
+
return JSON.stringify({
|
|
416
|
+
source: this.source,
|
|
417
|
+
logs: logList,
|
|
418
|
+
});
|
|
419
|
+
}
|
|
318
420
|
startRequestMonitor(requestMonitor) {
|
|
319
421
|
if (this.requestMonitorStarted)
|
|
320
422
|
return;
|
|
@@ -560,32 +662,75 @@ class ClsLoggerCore {
|
|
|
560
662
|
return;
|
|
561
663
|
}
|
|
562
664
|
this.memoryQueue.push(log);
|
|
563
|
-
|
|
665
|
+
const now = Date.now();
|
|
666
|
+
// 判断是否在启动合并窗口内
|
|
667
|
+
const inStartupWindow = this.startupDelayMs > 0 && now - this.initTs < this.startupDelayMs;
|
|
668
|
+
// 启动窗口内使用 startupMaxSize,正常情况使用 batchMaxSize
|
|
669
|
+
const effectiveMaxSize = inStartupWindow ? this.startupMaxSize : this.batchMaxSize;
|
|
670
|
+
if (this.memoryQueue.length >= effectiveMaxSize) {
|
|
564
671
|
void this.flushBatch();
|
|
565
672
|
return;
|
|
566
673
|
}
|
|
567
|
-
const now = Date.now();
|
|
568
674
|
const desiredDueAt = this.getDesiredBatchFlushDueAt(now);
|
|
569
675
|
const desiredDelay = Math.max(0, desiredDueAt - now);
|
|
570
676
|
if (!this.batchTimer) {
|
|
571
677
|
this.batchTimerDueAt = desiredDueAt;
|
|
678
|
+
this.scheduleFlush(desiredDelay);
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
// 启动合并窗口内:如果当前 timer 会"更早"触发,则延后到窗口结束,尽量减少多次发送
|
|
682
|
+
if (this.batchTimerDueAt !== null && this.batchTimerDueAt < desiredDueAt) {
|
|
683
|
+
this.cancelScheduledFlush();
|
|
684
|
+
this.batchTimerDueAt = desiredDueAt;
|
|
685
|
+
this.scheduleFlush(desiredDelay);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* 调度批量发送
|
|
690
|
+
* - 先使用 setTimeout 保证最小延迟(desiredDelay)
|
|
691
|
+
* - 若开启 useIdleCallback,在延迟结束后等待浏览器空闲再执行
|
|
692
|
+
*/
|
|
693
|
+
scheduleFlush(desiredDelay) {
|
|
694
|
+
if (this.useIdleCallback && typeof requestIdleCallback !== 'undefined') {
|
|
695
|
+
// 先 setTimeout 保证最小延迟,再 requestIdleCallback 在空闲时执行
|
|
696
|
+
this.batchTimer = setTimeout(() => {
|
|
697
|
+
const idleId = requestIdleCallback(() => {
|
|
698
|
+
this.pendingIdleCallback = null;
|
|
699
|
+
void this.flushBatch();
|
|
700
|
+
}, { timeout: this.idleTimeout });
|
|
701
|
+
this.pendingIdleCallback = idleId;
|
|
702
|
+
}, desiredDelay);
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
572
705
|
this.batchTimer = setTimeout(() => {
|
|
573
706
|
void this.flushBatch();
|
|
574
707
|
}, desiredDelay);
|
|
575
|
-
return;
|
|
576
708
|
}
|
|
577
|
-
|
|
578
|
-
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* 取消已调度的批量发送
|
|
712
|
+
* - 同时清理 setTimeout 和可能的 requestIdleCallback
|
|
713
|
+
*/
|
|
714
|
+
cancelScheduledFlush() {
|
|
715
|
+
// 清理 setTimeout
|
|
716
|
+
if (this.batchTimer) {
|
|
579
717
|
try {
|
|
580
718
|
clearTimeout(this.batchTimer);
|
|
581
719
|
}
|
|
582
720
|
catch {
|
|
583
721
|
// ignore
|
|
584
722
|
}
|
|
585
|
-
this.
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
723
|
+
this.batchTimer = null;
|
|
724
|
+
}
|
|
725
|
+
// 清理可能的 pendingIdleCallback
|
|
726
|
+
if (this.pendingIdleCallback !== null && typeof cancelIdleCallback !== 'undefined') {
|
|
727
|
+
try {
|
|
728
|
+
cancelIdleCallback(this.pendingIdleCallback);
|
|
729
|
+
}
|
|
730
|
+
catch {
|
|
731
|
+
// ignore
|
|
732
|
+
}
|
|
733
|
+
this.pendingIdleCallback = null;
|
|
589
734
|
}
|
|
590
735
|
}
|
|
591
736
|
getDesiredBatchFlushDueAt(nowTs) {
|
|
@@ -598,7 +743,7 @@ class ClsLoggerCore {
|
|
|
598
743
|
}
|
|
599
744
|
return nowTs + this.batchIntervalMs;
|
|
600
745
|
}
|
|
601
|
-
info(message, data = {}) {
|
|
746
|
+
info(message, data = {}, options) {
|
|
602
747
|
let msg = '';
|
|
603
748
|
let extra = {};
|
|
604
749
|
if (message instanceof Error) {
|
|
@@ -614,9 +759,18 @@ class ClsLoggerCore {
|
|
|
614
759
|
extra = data;
|
|
615
760
|
}
|
|
616
761
|
const payload = normalizeFlatFields({ message: msg, ...extra }, 'info');
|
|
617
|
-
|
|
762
|
+
const log = { type: 'info', data: payload, timestamp: Date.now() };
|
|
763
|
+
// info 默认走批量队列,支持 immediate 选项立即发送
|
|
764
|
+
if (options?.immediate) {
|
|
765
|
+
void this.sendReportLogs([log]).catch(() => {
|
|
766
|
+
this.cacheFailedReportLogs([log]);
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
this.report(log);
|
|
771
|
+
}
|
|
618
772
|
}
|
|
619
|
-
warn(message, data = {}) {
|
|
773
|
+
warn(message, data = {}, options) {
|
|
620
774
|
let msg = '';
|
|
621
775
|
let extra = {};
|
|
622
776
|
if (message instanceof Error) {
|
|
@@ -632,9 +786,18 @@ class ClsLoggerCore {
|
|
|
632
786
|
extra = data;
|
|
633
787
|
}
|
|
634
788
|
const payload = normalizeFlatFields({ message: msg, ...extra }, 'warn');
|
|
635
|
-
|
|
789
|
+
const log = { type: 'warn', data: payload, timestamp: Date.now() };
|
|
790
|
+
// warn 默认走批量队列,支持 immediate 选项立即发送
|
|
791
|
+
if (options?.immediate) {
|
|
792
|
+
void this.sendReportLogs([log]).catch(() => {
|
|
793
|
+
this.cacheFailedReportLogs([log]);
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
this.report(log);
|
|
798
|
+
}
|
|
636
799
|
}
|
|
637
|
-
error(message, data = {}) {
|
|
800
|
+
error(message, data = {}, options) {
|
|
638
801
|
let msg = '';
|
|
639
802
|
let extra = {};
|
|
640
803
|
if (message instanceof Error) {
|
|
@@ -650,7 +813,17 @@ class ClsLoggerCore {
|
|
|
650
813
|
extra = data;
|
|
651
814
|
}
|
|
652
815
|
const payload = normalizeFlatFields({ message: msg, ...extra }, 'error');
|
|
653
|
-
|
|
816
|
+
const log = { type: 'error', data: payload, timestamp: Date.now() };
|
|
817
|
+
// error 默认即时上报,除非显式指定 immediate: false
|
|
818
|
+
const immediate = options?.immediate ?? true;
|
|
819
|
+
if (immediate) {
|
|
820
|
+
void this.sendReportLogs([log]).catch(() => {
|
|
821
|
+
this.cacheFailedReportLogs([log]);
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
this.report(log);
|
|
826
|
+
}
|
|
654
827
|
}
|
|
655
828
|
track(trackType, data = {}) {
|
|
656
829
|
if (!trackType)
|
|
@@ -665,10 +838,7 @@ class ClsLoggerCore {
|
|
|
665
838
|
* 立即发送内存队列
|
|
666
839
|
*/
|
|
667
840
|
async flushBatch() {
|
|
668
|
-
|
|
669
|
-
clearTimeout(this.batchTimer);
|
|
670
|
-
this.batchTimer = null;
|
|
671
|
-
}
|
|
841
|
+
this.cancelScheduledFlush();
|
|
672
842
|
this.batchTimerDueAt = null;
|
|
673
843
|
if (this.memoryQueue.length === 0)
|
|
674
844
|
return;
|
|
@@ -774,7 +944,14 @@ class ClsLoggerCore {
|
|
|
774
944
|
// 先清空,再尝试发送
|
|
775
945
|
writeStringStorage(this.failedCacheKey, JSON.stringify([]));
|
|
776
946
|
this.memoryQueue.unshift(...logs);
|
|
777
|
-
|
|
947
|
+
// 触发定时器而非直接 flush,以尊重 startupDelayMs 配置
|
|
948
|
+
if (!this.batchTimer) {
|
|
949
|
+
const now = Date.now();
|
|
950
|
+
const desiredDueAt = this.getDesiredBatchFlushDueAt(now);
|
|
951
|
+
const desiredDelay = Math.max(0, desiredDueAt - now);
|
|
952
|
+
this.batchTimerDueAt = desiredDueAt;
|
|
953
|
+
this.scheduleFlush(desiredDelay);
|
|
954
|
+
}
|
|
778
955
|
}
|
|
779
956
|
/**
|
|
780
957
|
* 统计/计数类日志:按字段展开上报(若 data 为空默认 1)
|
|
@@ -1010,6 +1187,13 @@ function installMiniRequestMonitor(report, opts = {}) {
|
|
|
1010
1187
|
const DEFAULT_MAX_TEXT = 4000;
|
|
1011
1188
|
const DEFAULT_DEDUPE_WINDOW_MS = 3000;
|
|
1012
1189
|
const DEFAULT_DEDUPE_MAX_KEYS = 200;
|
|
1190
|
+
/** 默认忽略的无意义错误信息 */
|
|
1191
|
+
const DEFAULT_IGNORE_MESSAGES = [
|
|
1192
|
+
'Script error.',
|
|
1193
|
+
'Script error',
|
|
1194
|
+
/^ResizeObserver loop/,
|
|
1195
|
+
'Permission was denied',
|
|
1196
|
+
];
|
|
1013
1197
|
function truncate(s, maxLen) {
|
|
1014
1198
|
if (!s)
|
|
1015
1199
|
return s;
|
|
@@ -1022,12 +1206,33 @@ function sampleHit$1(sampleRate) {
|
|
|
1022
1206
|
return false;
|
|
1023
1207
|
return Math.random() < sampleRate;
|
|
1024
1208
|
}
|
|
1209
|
+
/** 检查消息是否应该被忽略 */
|
|
1210
|
+
function shouldIgnoreMessage(message, ignorePatterns) {
|
|
1211
|
+
if (!message || ignorePatterns.length === 0)
|
|
1212
|
+
return false;
|
|
1213
|
+
return ignorePatterns.some((pattern) => {
|
|
1214
|
+
if (typeof pattern === 'string') {
|
|
1215
|
+
return message === pattern || message.includes(pattern);
|
|
1216
|
+
}
|
|
1217
|
+
return pattern.test(message);
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1025
1220
|
function getMpPagePath() {
|
|
1026
1221
|
try {
|
|
1027
1222
|
const pages = globalThis.getCurrentPages?.();
|
|
1028
1223
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1029
1224
|
const page = pages[pages.length - 1];
|
|
1030
|
-
|
|
1225
|
+
const route = page.route || page.__route__;
|
|
1226
|
+
if (typeof route === 'string') {
|
|
1227
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1228
|
+
const options = page.options || {};
|
|
1229
|
+
const keys = Object.keys(options);
|
|
1230
|
+
if (keys.length > 0) {
|
|
1231
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1232
|
+
path = `${path}?${qs}`;
|
|
1233
|
+
}
|
|
1234
|
+
return path;
|
|
1235
|
+
}
|
|
1031
1236
|
}
|
|
1032
1237
|
return '';
|
|
1033
1238
|
}
|
|
@@ -1116,6 +1321,9 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1116
1321
|
if (!sampleHit$1(options.sampleRate))
|
|
1117
1322
|
return;
|
|
1118
1323
|
const e = normalizeErrorLike(msg, options.maxTextLength);
|
|
1324
|
+
// 检查是否应该忽略此错误
|
|
1325
|
+
if (shouldIgnoreMessage(e.message, options.ignoreMessages))
|
|
1326
|
+
return;
|
|
1119
1327
|
const payload = {
|
|
1120
1328
|
pagePath: getMpPagePath(),
|
|
1121
1329
|
source: 'wx.onError',
|
|
@@ -1143,6 +1351,9 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1143
1351
|
if (!sampleHit$1(options.sampleRate))
|
|
1144
1352
|
return;
|
|
1145
1353
|
const e = normalizeErrorLike(res?.reason, options.maxTextLength);
|
|
1354
|
+
// 检查是否应该忽略此错误
|
|
1355
|
+
if (shouldIgnoreMessage(e.message, options.ignoreMessages))
|
|
1356
|
+
return;
|
|
1146
1357
|
const payload = {
|
|
1147
1358
|
pagePath: getMpPagePath(),
|
|
1148
1359
|
source: 'wx.onUnhandledRejection',
|
|
@@ -1174,15 +1385,18 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1174
1385
|
try {
|
|
1175
1386
|
if (sampleHit$1(options.sampleRate)) {
|
|
1176
1387
|
const e = normalizeErrorLike(args?.[0], options.maxTextLength);
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1388
|
+
// 检查是否应该忽略此错误
|
|
1389
|
+
if (!shouldIgnoreMessage(e.message, options.ignoreMessages)) {
|
|
1390
|
+
const payload = {
|
|
1391
|
+
pagePath: getMpPagePath(),
|
|
1392
|
+
source: 'App.onError',
|
|
1393
|
+
message: e.message,
|
|
1394
|
+
errorName: e.name,
|
|
1395
|
+
stack: e.stack,
|
|
1396
|
+
};
|
|
1397
|
+
if (shouldReport(buildErrorKey(options.reportType, payload)))
|
|
1398
|
+
report(options.reportType, payload);
|
|
1399
|
+
}
|
|
1186
1400
|
}
|
|
1187
1401
|
}
|
|
1188
1402
|
catch {
|
|
@@ -1198,15 +1412,18 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1198
1412
|
if (sampleHit$1(options.sampleRate)) {
|
|
1199
1413
|
const reason = args?.[0]?.reason ?? args?.[0];
|
|
1200
1414
|
const e = normalizeErrorLike(reason, options.maxTextLength);
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1415
|
+
// 检查是否应该忽略此错误
|
|
1416
|
+
if (!shouldIgnoreMessage(e.message, options.ignoreMessages)) {
|
|
1417
|
+
const payload = {
|
|
1418
|
+
pagePath: getMpPagePath(),
|
|
1419
|
+
source: 'App.onUnhandledRejection',
|
|
1420
|
+
message: e.message,
|
|
1421
|
+
errorName: e.name,
|
|
1422
|
+
stack: e.stack,
|
|
1423
|
+
};
|
|
1424
|
+
if (shouldReport(buildErrorKey(options.reportType, payload)))
|
|
1425
|
+
report(options.reportType, payload);
|
|
1426
|
+
}
|
|
1210
1427
|
}
|
|
1211
1428
|
}
|
|
1212
1429
|
catch {
|
|
@@ -1237,6 +1454,7 @@ function installMiniErrorMonitor(report, opts = {}) {
|
|
|
1237
1454
|
maxTextLength: raw.maxTextLength ?? DEFAULT_MAX_TEXT,
|
|
1238
1455
|
dedupeWindowMs: raw.dedupeWindowMs ?? DEFAULT_DEDUPE_WINDOW_MS,
|
|
1239
1456
|
dedupeMaxKeys: raw.dedupeMaxKeys ?? DEFAULT_DEDUPE_MAX_KEYS,
|
|
1457
|
+
ignoreMessages: raw.ignoreMessages ?? DEFAULT_IGNORE_MESSAGES,
|
|
1240
1458
|
};
|
|
1241
1459
|
installMiniProgramErrorMonitor(report, options);
|
|
1242
1460
|
}
|
|
@@ -1379,7 +1597,16 @@ function getMiniProgramPagePath() {
|
|
|
1379
1597
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
1380
1598
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
1381
1599
|
const route = (last?.route || last?.__route__);
|
|
1382
|
-
|
|
1600
|
+
if (typeof route !== 'string')
|
|
1601
|
+
return '';
|
|
1602
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1603
|
+
const options = last?.options || {};
|
|
1604
|
+
const keys = Object.keys(options);
|
|
1605
|
+
if (keys.length > 0) {
|
|
1606
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1607
|
+
path = `${path}?${qs}`;
|
|
1608
|
+
}
|
|
1609
|
+
return path;
|
|
1383
1610
|
}
|
|
1384
1611
|
catch {
|
|
1385
1612
|
return '';
|
|
@@ -1642,7 +1869,7 @@ function getMiniProgramDeviceInfo(options) {
|
|
|
1642
1869
|
try {
|
|
1643
1870
|
if (typeof wxAny.getNetworkTypeSync === 'function') {
|
|
1644
1871
|
const n = wxAny.getNetworkTypeSync();
|
|
1645
|
-
out.networkType = n?.networkType ? String(n.networkType) : '';
|
|
1872
|
+
out.networkType = n?.networkType ? String(n.networkType).toUpperCase() : '';
|
|
1646
1873
|
}
|
|
1647
1874
|
else if (typeof wxAny.getNetworkType === 'function') {
|
|
1648
1875
|
// 异步更新:先不阻塞初始化
|
|
@@ -1652,7 +1879,9 @@ function getMiniProgramDeviceInfo(options) {
|
|
|
1652
1879
|
const g = globalThis;
|
|
1653
1880
|
if (!g.__beLinkClsLoggerDeviceInfo__)
|
|
1654
1881
|
g.__beLinkClsLoggerDeviceInfo__ = {};
|
|
1655
|
-
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType
|
|
1882
|
+
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType
|
|
1883
|
+
? String(res.networkType).toUpperCase()
|
|
1884
|
+
: '';
|
|
1656
1885
|
}
|
|
1657
1886
|
catch {
|
|
1658
1887
|
// ignore
|
|
@@ -1671,7 +1900,7 @@ function getMiniProgramDeviceInfo(options) {
|
|
|
1671
1900
|
const g = globalThis;
|
|
1672
1901
|
if (!g.__beLinkClsLoggerDeviceInfo__)
|
|
1673
1902
|
g.__beLinkClsLoggerDeviceInfo__ = {};
|
|
1674
|
-
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType ? String(res.networkType) : '';
|
|
1903
|
+
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType ? String(res.networkType).toUpperCase() : '';
|
|
1675
1904
|
}
|
|
1676
1905
|
catch {
|
|
1677
1906
|
// ignore
|
|
@@ -1712,7 +1941,7 @@ function createMiniDeviceInfoBaseFields(opts) {
|
|
|
1712
1941
|
try {
|
|
1713
1942
|
const g = globalThis;
|
|
1714
1943
|
const extra = g[globalKey];
|
|
1715
|
-
if (extra &&
|
|
1944
|
+
if (extra && typeof extra === 'object')
|
|
1716
1945
|
return { ...base, ...extra };
|
|
1717
1946
|
}
|
|
1718
1947
|
catch {
|
package/dist/types.d.ts
CHANGED
|
@@ -29,10 +29,42 @@ export interface BatchOptions {
|
|
|
29
29
|
/**
|
|
30
30
|
* 启动阶段合并窗口(ms)
|
|
31
31
|
* - 目的:减少初始化/首屏阶段(perf/resource 等日志密集期)被 intervalMs 拆成多次上报
|
|
32
|
-
* - 行为:在该窗口内尽量延迟 flush
|
|
32
|
+
* - 行为:在该窗口内尽量延迟 flush 到窗口结束
|
|
33
33
|
* - 默认:0(不开启)
|
|
34
34
|
*/
|
|
35
35
|
startupDelayMs?: number;
|
|
36
|
+
/**
|
|
37
|
+
* 启动阶段的 maxSize(启动窗口内生效)
|
|
38
|
+
* - 目的:防止启动期间日志密集导致 maxSize 被频繁触发而打断 startupDelayMs
|
|
39
|
+
* - 行为:在 startupDelayMs 窗口内使用此值作为队列阈值
|
|
40
|
+
* - 默认:maxSize * 10(若未设置则为 200)
|
|
41
|
+
*/
|
|
42
|
+
startupMaxSize?: number;
|
|
43
|
+
/**
|
|
44
|
+
* 是否使用浏览器空闲时间上报
|
|
45
|
+
* - 开启后会先等待 intervalMs/startupDelayMs,然后在浏览器空闲时执行发送
|
|
46
|
+
* - 配合 idleTimeout 使用,保证即使浏览器繁忙也能在超时后发送
|
|
47
|
+
* - 默认:false
|
|
48
|
+
*/
|
|
49
|
+
useIdleCallback?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 空闲回调超时时间(ms)
|
|
52
|
+
* - 当 useIdleCallback 为 true 时生效
|
|
53
|
+
* - 在等待空闲期间,即使浏览器繁忙,也会在此时间后强制执行
|
|
54
|
+
* - 默认:3000
|
|
55
|
+
*/
|
|
56
|
+
idleTimeout?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* info/warn/error 等方法的上报选项
|
|
60
|
+
*/
|
|
61
|
+
export interface ReportOptions {
|
|
62
|
+
/**
|
|
63
|
+
* 是否立即发送,不等待批量队列
|
|
64
|
+
* - error() 默认为 true(即时上报)
|
|
65
|
+
* - info()/warn() 默认为 false(走批量队列)
|
|
66
|
+
*/
|
|
67
|
+
immediate?: boolean;
|
|
36
68
|
}
|
|
37
69
|
export interface ClsLoggerBaseOptions {
|
|
38
70
|
/**
|
|
@@ -194,7 +226,7 @@ export interface ErrorMonitorOptions {
|
|
|
194
226
|
/**
|
|
195
227
|
* 错误去重窗口(ms)
|
|
196
228
|
* - 目的:避免同一错误在短时间内频繁触发导致重复上报
|
|
197
|
-
* -
|
|
229
|
+
* - 行为:同一"错误签名"在窗口内只会上报一次
|
|
198
230
|
* - 默认:3000
|
|
199
231
|
*/
|
|
200
232
|
dedupeWindowMs?: number;
|
|
@@ -203,6 +235,12 @@ export interface ErrorMonitorOptions {
|
|
|
203
235
|
* - 默认:200
|
|
204
236
|
*/
|
|
205
237
|
dedupeMaxKeys?: number;
|
|
238
|
+
/**
|
|
239
|
+
* 忽略的错误信息(字符串或正则)
|
|
240
|
+
* - 匹配 message 字段,命中则不上报
|
|
241
|
+
* - 默认忽略:['Script error.', 'Script error', 'ResizeObserver loop']
|
|
242
|
+
*/
|
|
243
|
+
ignoreMessages?: Array<string | RegExp>;
|
|
206
244
|
}
|
|
207
245
|
export interface PerformanceMonitorOptions {
|
|
208
246
|
/** 是否开启,默认 true */
|
|
@@ -229,7 +267,7 @@ export interface DeviceInfoOptions {
|
|
|
229
267
|
includeUserAgent?: boolean;
|
|
230
268
|
/** Web/H5:是否包含 navigator.connection 信息,默认 true */
|
|
231
269
|
includeNetwork?: boolean;
|
|
232
|
-
/**
|
|
270
|
+
/** Web/小程序:是否尝试采集网络类型(Web: best effort; 小程序: 异步更新),默认 true */
|
|
233
271
|
includeNetworkType?: boolean;
|
|
234
272
|
}
|
|
235
273
|
export interface BehaviorMonitorOptions {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhE,sCAAsC;AACtC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,a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ceRoot":"","sources":["../../src/web/deviceInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAkK9D,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,OAAO,GAAG,iBAAiB,GAAG,SAAS,GAC5C,CAAC,MAAM,UAAU,CAAC,GAAG,IAAI,CAqC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMonitor.d.ts","sourceRoot":"","sources":["../../src/web/errorMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"errorMonitor.d.ts","sourceRoot":"","sources":["../../src/web/errorMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;AAmMzD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAE,OAAO,GAAG,mBAAmB,GAAG,SAAc,GAAG,IAAI,CAiBnH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performanceMonitor.d.ts","sourceRoot":"","sources":["../../src/web/performanceMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAEtE,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"performanceMonitor.d.ts","sourceRoot":"","sources":["../../src/web/performanceMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAEtE,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;AA6QzD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,QAAQ,EAChB,IAAI,GAAE,OAAO,GAAG,yBAAyB,GAAG,SAAc,GACzD,IAAI,CAiBN"}
|