@be-link/cls-logger 1.0.11 → 1.0.13
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 +38 -5
- package/dist/ClsLoggerCore.d.ts.map +1 -1
- package/dist/index.esm.js +380 -62
- package/dist/index.js +380 -62
- package/dist/index.umd.js +380 -62
- package/dist/mini/ClsLogger.d.ts +6 -0
- package/dist/mini/ClsLogger.d.ts.map +1 -1
- 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 +298 -49
- package/dist/mini.js +298 -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 +304 -38
- package/dist/web.js +304 -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,97 @@ class ClsLoggerCore {
|
|
|
315
327
|
return auto;
|
|
316
328
|
return undefined;
|
|
317
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* 设置页面可见性监听
|
|
332
|
+
* - visibilitychange: 页面隐藏时使用 sendBeacon 发送队列
|
|
333
|
+
* - pagehide: 作为移动端 fallback
|
|
334
|
+
* - 子类可覆写此方法以实现平台特定的监听(如小程序的 wx.onAppHide)
|
|
335
|
+
*/
|
|
336
|
+
setupVisibilityListener() {
|
|
337
|
+
if (typeof document === 'undefined' || typeof window === 'undefined')
|
|
338
|
+
return;
|
|
339
|
+
// 避免重复监听
|
|
340
|
+
if (this.visibilityCleanup)
|
|
341
|
+
return;
|
|
342
|
+
const handleVisibilityChange = () => {
|
|
343
|
+
if (document.visibilityState === 'hidden') {
|
|
344
|
+
// 使用微任务延迟 flush,确保 web-vitals 等第三方库的 visibilitychange 回调先执行
|
|
345
|
+
// 这样 LCP/CLS/INP 等指标能先入队,再被 flush 发送
|
|
346
|
+
// 注意:queueMicrotask 比 setTimeout(0) 更可靠,不会被延迟太久
|
|
347
|
+
queueMicrotask(() => {
|
|
348
|
+
this.flushBatchSync();
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
const handlePageHide = () => {
|
|
353
|
+
// pagehide 不能延迟,因为浏览器可能立即关闭页面
|
|
354
|
+
// 但 pagehide 通常在 visibilitychange 之后触发,此时队列应该已经包含 web-vitals 指标
|
|
355
|
+
this.flushBatchSync();
|
|
356
|
+
};
|
|
357
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
358
|
+
window.addEventListener('pagehide', handlePageHide);
|
|
359
|
+
this.visibilityCleanup = () => {
|
|
360
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
361
|
+
window.removeEventListener('pagehide', handlePageHide);
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* 同步发送内存队列(使用 sendBeacon)
|
|
366
|
+
* - 用于页面关闭时确保数据发送
|
|
367
|
+
* - sendBeacon 不可用时降级为缓存到 localStorage
|
|
368
|
+
*/
|
|
369
|
+
flushBatchSync() {
|
|
370
|
+
if (this.memoryQueue.length === 0)
|
|
371
|
+
return;
|
|
372
|
+
// 清除定时器
|
|
373
|
+
if (this.batchTimer) {
|
|
374
|
+
try {
|
|
375
|
+
if (this.useIdleCallback && typeof cancelIdleCallback !== 'undefined') {
|
|
376
|
+
cancelIdleCallback(this.batchTimer);
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
clearTimeout(this.batchTimer);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
// ignore
|
|
384
|
+
}
|
|
385
|
+
this.batchTimer = null;
|
|
386
|
+
}
|
|
387
|
+
this.batchTimerDueAt = null;
|
|
388
|
+
const logs = [...this.memoryQueue];
|
|
389
|
+
this.memoryQueue = [];
|
|
390
|
+
// 优先使用 sendBeacon(页面关闭时可靠发送)
|
|
391
|
+
if (typeof navigator !== 'undefined' && typeof navigator.sendBeacon === 'function') {
|
|
392
|
+
try {
|
|
393
|
+
const payload = this.buildSendBeaconPayload(logs);
|
|
394
|
+
const blob = new Blob([payload], { type: 'application/json' });
|
|
395
|
+
const url = `${this.endpoint}/structuredlog?topic_id=${this.topicId}`;
|
|
396
|
+
const success = navigator.sendBeacon(url, blob);
|
|
397
|
+
if (!success) {
|
|
398
|
+
// sendBeacon 返回 false 时,降级缓存
|
|
399
|
+
this.cacheFailedReportLogs(logs);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
catch {
|
|
403
|
+
this.cacheFailedReportLogs(logs);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
// 不支持 sendBeacon,降级缓存到 localStorage
|
|
408
|
+
this.cacheFailedReportLogs(logs);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* 构建 sendBeacon 的 payload
|
|
413
|
+
*/
|
|
414
|
+
buildSendBeaconPayload(logs) {
|
|
415
|
+
const logList = logs.map((log) => this.buildReportFields(log));
|
|
416
|
+
return JSON.stringify({
|
|
417
|
+
source: this.source,
|
|
418
|
+
logs: logList,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
318
421
|
startRequestMonitor(requestMonitor) {
|
|
319
422
|
if (this.requestMonitorStarted)
|
|
320
423
|
return;
|
|
@@ -560,32 +663,75 @@ class ClsLoggerCore {
|
|
|
560
663
|
return;
|
|
561
664
|
}
|
|
562
665
|
this.memoryQueue.push(log);
|
|
563
|
-
|
|
666
|
+
const now = Date.now();
|
|
667
|
+
// 判断是否在启动合并窗口内
|
|
668
|
+
const inStartupWindow = this.startupDelayMs > 0 && now - this.initTs < this.startupDelayMs;
|
|
669
|
+
// 启动窗口内使用 startupMaxSize,正常情况使用 batchMaxSize
|
|
670
|
+
const effectiveMaxSize = inStartupWindow ? this.startupMaxSize : this.batchMaxSize;
|
|
671
|
+
if (this.memoryQueue.length >= effectiveMaxSize) {
|
|
564
672
|
void this.flushBatch();
|
|
565
673
|
return;
|
|
566
674
|
}
|
|
567
|
-
const now = Date.now();
|
|
568
675
|
const desiredDueAt = this.getDesiredBatchFlushDueAt(now);
|
|
569
676
|
const desiredDelay = Math.max(0, desiredDueAt - now);
|
|
570
677
|
if (!this.batchTimer) {
|
|
571
678
|
this.batchTimerDueAt = desiredDueAt;
|
|
679
|
+
this.scheduleFlush(desiredDelay);
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
// 启动合并窗口内:如果当前 timer 会"更早"触发,则延后到窗口结束,尽量减少多次发送
|
|
683
|
+
if (this.batchTimerDueAt !== null && this.batchTimerDueAt < desiredDueAt) {
|
|
684
|
+
this.cancelScheduledFlush();
|
|
685
|
+
this.batchTimerDueAt = desiredDueAt;
|
|
686
|
+
this.scheduleFlush(desiredDelay);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* 调度批量发送
|
|
691
|
+
* - 先使用 setTimeout 保证最小延迟(desiredDelay)
|
|
692
|
+
* - 若开启 useIdleCallback,在延迟结束后等待浏览器空闲再执行
|
|
693
|
+
*/
|
|
694
|
+
scheduleFlush(desiredDelay) {
|
|
695
|
+
if (this.useIdleCallback && typeof requestIdleCallback !== 'undefined') {
|
|
696
|
+
// 先 setTimeout 保证最小延迟,再 requestIdleCallback 在空闲时执行
|
|
697
|
+
this.batchTimer = setTimeout(() => {
|
|
698
|
+
const idleId = requestIdleCallback(() => {
|
|
699
|
+
this.pendingIdleCallback = null;
|
|
700
|
+
void this.flushBatch();
|
|
701
|
+
}, { timeout: this.idleTimeout });
|
|
702
|
+
this.pendingIdleCallback = idleId;
|
|
703
|
+
}, desiredDelay);
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
572
706
|
this.batchTimer = setTimeout(() => {
|
|
573
707
|
void this.flushBatch();
|
|
574
708
|
}, desiredDelay);
|
|
575
|
-
return;
|
|
576
709
|
}
|
|
577
|
-
|
|
578
|
-
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* 取消已调度的批量发送
|
|
713
|
+
* - 同时清理 setTimeout 和可能的 requestIdleCallback
|
|
714
|
+
*/
|
|
715
|
+
cancelScheduledFlush() {
|
|
716
|
+
// 清理 setTimeout
|
|
717
|
+
if (this.batchTimer) {
|
|
579
718
|
try {
|
|
580
719
|
clearTimeout(this.batchTimer);
|
|
581
720
|
}
|
|
582
721
|
catch {
|
|
583
722
|
// ignore
|
|
584
723
|
}
|
|
585
|
-
this.
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
724
|
+
this.batchTimer = null;
|
|
725
|
+
}
|
|
726
|
+
// 清理可能的 pendingIdleCallback
|
|
727
|
+
if (this.pendingIdleCallback !== null && typeof cancelIdleCallback !== 'undefined') {
|
|
728
|
+
try {
|
|
729
|
+
cancelIdleCallback(this.pendingIdleCallback);
|
|
730
|
+
}
|
|
731
|
+
catch {
|
|
732
|
+
// ignore
|
|
733
|
+
}
|
|
734
|
+
this.pendingIdleCallback = null;
|
|
589
735
|
}
|
|
590
736
|
}
|
|
591
737
|
getDesiredBatchFlushDueAt(nowTs) {
|
|
@@ -598,7 +744,7 @@ class ClsLoggerCore {
|
|
|
598
744
|
}
|
|
599
745
|
return nowTs + this.batchIntervalMs;
|
|
600
746
|
}
|
|
601
|
-
info(message, data = {}) {
|
|
747
|
+
info(message, data = {}, options) {
|
|
602
748
|
let msg = '';
|
|
603
749
|
let extra = {};
|
|
604
750
|
if (message instanceof Error) {
|
|
@@ -614,9 +760,18 @@ class ClsLoggerCore {
|
|
|
614
760
|
extra = data;
|
|
615
761
|
}
|
|
616
762
|
const payload = normalizeFlatFields({ message: msg, ...extra }, 'info');
|
|
617
|
-
|
|
763
|
+
const log = { type: 'info', data: payload, timestamp: Date.now() };
|
|
764
|
+
// info 默认走批量队列,支持 immediate 选项立即发送
|
|
765
|
+
if (options?.immediate) {
|
|
766
|
+
void this.sendReportLogs([log]).catch(() => {
|
|
767
|
+
this.cacheFailedReportLogs([log]);
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
this.report(log);
|
|
772
|
+
}
|
|
618
773
|
}
|
|
619
|
-
warn(message, data = {}) {
|
|
774
|
+
warn(message, data = {}, options) {
|
|
620
775
|
let msg = '';
|
|
621
776
|
let extra = {};
|
|
622
777
|
if (message instanceof Error) {
|
|
@@ -632,9 +787,18 @@ class ClsLoggerCore {
|
|
|
632
787
|
extra = data;
|
|
633
788
|
}
|
|
634
789
|
const payload = normalizeFlatFields({ message: msg, ...extra }, 'warn');
|
|
635
|
-
|
|
790
|
+
const log = { type: 'warn', data: payload, timestamp: Date.now() };
|
|
791
|
+
// warn 默认走批量队列,支持 immediate 选项立即发送
|
|
792
|
+
if (options?.immediate) {
|
|
793
|
+
void this.sendReportLogs([log]).catch(() => {
|
|
794
|
+
this.cacheFailedReportLogs([log]);
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
else {
|
|
798
|
+
this.report(log);
|
|
799
|
+
}
|
|
636
800
|
}
|
|
637
|
-
error(message, data = {}) {
|
|
801
|
+
error(message, data = {}, options) {
|
|
638
802
|
let msg = '';
|
|
639
803
|
let extra = {};
|
|
640
804
|
if (message instanceof Error) {
|
|
@@ -650,7 +814,17 @@ class ClsLoggerCore {
|
|
|
650
814
|
extra = data;
|
|
651
815
|
}
|
|
652
816
|
const payload = normalizeFlatFields({ message: msg, ...extra }, 'error');
|
|
653
|
-
|
|
817
|
+
const log = { type: 'error', data: payload, timestamp: Date.now() };
|
|
818
|
+
// error 默认即时上报,除非显式指定 immediate: false
|
|
819
|
+
const immediate = options?.immediate ?? true;
|
|
820
|
+
if (immediate) {
|
|
821
|
+
void this.sendReportLogs([log]).catch(() => {
|
|
822
|
+
this.cacheFailedReportLogs([log]);
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
this.report(log);
|
|
827
|
+
}
|
|
654
828
|
}
|
|
655
829
|
track(trackType, data = {}) {
|
|
656
830
|
if (!trackType)
|
|
@@ -665,10 +839,7 @@ class ClsLoggerCore {
|
|
|
665
839
|
* 立即发送内存队列
|
|
666
840
|
*/
|
|
667
841
|
async flushBatch() {
|
|
668
|
-
|
|
669
|
-
clearTimeout(this.batchTimer);
|
|
670
|
-
this.batchTimer = null;
|
|
671
|
-
}
|
|
842
|
+
this.cancelScheduledFlush();
|
|
672
843
|
this.batchTimerDueAt = null;
|
|
673
844
|
if (this.memoryQueue.length === 0)
|
|
674
845
|
return;
|
|
@@ -774,7 +945,14 @@ class ClsLoggerCore {
|
|
|
774
945
|
// 先清空,再尝试发送
|
|
775
946
|
writeStringStorage(this.failedCacheKey, JSON.stringify([]));
|
|
776
947
|
this.memoryQueue.unshift(...logs);
|
|
777
|
-
|
|
948
|
+
// 触发定时器而非直接 flush,以尊重 startupDelayMs 配置
|
|
949
|
+
if (!this.batchTimer) {
|
|
950
|
+
const now = Date.now();
|
|
951
|
+
const desiredDueAt = this.getDesiredBatchFlushDueAt(now);
|
|
952
|
+
const desiredDelay = Math.max(0, desiredDueAt - now);
|
|
953
|
+
this.batchTimerDueAt = desiredDueAt;
|
|
954
|
+
this.scheduleFlush(desiredDelay);
|
|
955
|
+
}
|
|
778
956
|
}
|
|
779
957
|
/**
|
|
780
958
|
* 统计/计数类日志:按字段展开上报(若 data 为空默认 1)
|
|
@@ -1010,6 +1188,13 @@ function installMiniRequestMonitor(report, opts = {}) {
|
|
|
1010
1188
|
const DEFAULT_MAX_TEXT = 4000;
|
|
1011
1189
|
const DEFAULT_DEDUPE_WINDOW_MS = 3000;
|
|
1012
1190
|
const DEFAULT_DEDUPE_MAX_KEYS = 200;
|
|
1191
|
+
/** 默认忽略的无意义错误信息 */
|
|
1192
|
+
const DEFAULT_IGNORE_MESSAGES = [
|
|
1193
|
+
'Script error.',
|
|
1194
|
+
'Script error',
|
|
1195
|
+
/^ResizeObserver loop/,
|
|
1196
|
+
'Permission was denied',
|
|
1197
|
+
];
|
|
1013
1198
|
function truncate(s, maxLen) {
|
|
1014
1199
|
if (!s)
|
|
1015
1200
|
return s;
|
|
@@ -1022,12 +1207,33 @@ function sampleHit$1(sampleRate) {
|
|
|
1022
1207
|
return false;
|
|
1023
1208
|
return Math.random() < sampleRate;
|
|
1024
1209
|
}
|
|
1210
|
+
/** 检查消息是否应该被忽略 */
|
|
1211
|
+
function shouldIgnoreMessage(message, ignorePatterns) {
|
|
1212
|
+
if (!message || ignorePatterns.length === 0)
|
|
1213
|
+
return false;
|
|
1214
|
+
return ignorePatterns.some((pattern) => {
|
|
1215
|
+
if (typeof pattern === 'string') {
|
|
1216
|
+
return message === pattern || message.includes(pattern);
|
|
1217
|
+
}
|
|
1218
|
+
return pattern.test(message);
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1025
1221
|
function getMpPagePath() {
|
|
1026
1222
|
try {
|
|
1027
1223
|
const pages = globalThis.getCurrentPages?.();
|
|
1028
1224
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1029
1225
|
const page = pages[pages.length - 1];
|
|
1030
|
-
|
|
1226
|
+
const route = page.route || page.__route__;
|
|
1227
|
+
if (typeof route === 'string') {
|
|
1228
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1229
|
+
const options = page.options || {};
|
|
1230
|
+
const keys = Object.keys(options);
|
|
1231
|
+
if (keys.length > 0) {
|
|
1232
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1233
|
+
path = `${path}?${qs}`;
|
|
1234
|
+
}
|
|
1235
|
+
return path;
|
|
1236
|
+
}
|
|
1031
1237
|
}
|
|
1032
1238
|
return '';
|
|
1033
1239
|
}
|
|
@@ -1116,6 +1322,9 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1116
1322
|
if (!sampleHit$1(options.sampleRate))
|
|
1117
1323
|
return;
|
|
1118
1324
|
const e = normalizeErrorLike(msg, options.maxTextLength);
|
|
1325
|
+
// 检查是否应该忽略此错误
|
|
1326
|
+
if (shouldIgnoreMessage(e.message, options.ignoreMessages))
|
|
1327
|
+
return;
|
|
1119
1328
|
const payload = {
|
|
1120
1329
|
pagePath: getMpPagePath(),
|
|
1121
1330
|
source: 'wx.onError',
|
|
@@ -1143,6 +1352,9 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1143
1352
|
if (!sampleHit$1(options.sampleRate))
|
|
1144
1353
|
return;
|
|
1145
1354
|
const e = normalizeErrorLike(res?.reason, options.maxTextLength);
|
|
1355
|
+
// 检查是否应该忽略此错误
|
|
1356
|
+
if (shouldIgnoreMessage(e.message, options.ignoreMessages))
|
|
1357
|
+
return;
|
|
1146
1358
|
const payload = {
|
|
1147
1359
|
pagePath: getMpPagePath(),
|
|
1148
1360
|
source: 'wx.onUnhandledRejection',
|
|
@@ -1174,15 +1386,18 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1174
1386
|
try {
|
|
1175
1387
|
if (sampleHit$1(options.sampleRate)) {
|
|
1176
1388
|
const e = normalizeErrorLike(args?.[0], options.maxTextLength);
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1389
|
+
// 检查是否应该忽略此错误
|
|
1390
|
+
if (!shouldIgnoreMessage(e.message, options.ignoreMessages)) {
|
|
1391
|
+
const payload = {
|
|
1392
|
+
pagePath: getMpPagePath(),
|
|
1393
|
+
source: 'App.onError',
|
|
1394
|
+
message: e.message,
|
|
1395
|
+
errorName: e.name,
|
|
1396
|
+
stack: e.stack,
|
|
1397
|
+
};
|
|
1398
|
+
if (shouldReport(buildErrorKey(options.reportType, payload)))
|
|
1399
|
+
report(options.reportType, payload);
|
|
1400
|
+
}
|
|
1186
1401
|
}
|
|
1187
1402
|
}
|
|
1188
1403
|
catch {
|
|
@@ -1198,15 +1413,18 @@ function installMiniProgramErrorMonitor(report, options) {
|
|
|
1198
1413
|
if (sampleHit$1(options.sampleRate)) {
|
|
1199
1414
|
const reason = args?.[0]?.reason ?? args?.[0];
|
|
1200
1415
|
const e = normalizeErrorLike(reason, options.maxTextLength);
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1416
|
+
// 检查是否应该忽略此错误
|
|
1417
|
+
if (!shouldIgnoreMessage(e.message, options.ignoreMessages)) {
|
|
1418
|
+
const payload = {
|
|
1419
|
+
pagePath: getMpPagePath(),
|
|
1420
|
+
source: 'App.onUnhandledRejection',
|
|
1421
|
+
message: e.message,
|
|
1422
|
+
errorName: e.name,
|
|
1423
|
+
stack: e.stack,
|
|
1424
|
+
};
|
|
1425
|
+
if (shouldReport(buildErrorKey(options.reportType, payload)))
|
|
1426
|
+
report(options.reportType, payload);
|
|
1427
|
+
}
|
|
1210
1428
|
}
|
|
1211
1429
|
}
|
|
1212
1430
|
catch {
|
|
@@ -1237,6 +1455,7 @@ function installMiniErrorMonitor(report, opts = {}) {
|
|
|
1237
1455
|
maxTextLength: raw.maxTextLength ?? DEFAULT_MAX_TEXT,
|
|
1238
1456
|
dedupeWindowMs: raw.dedupeWindowMs ?? DEFAULT_DEDUPE_WINDOW_MS,
|
|
1239
1457
|
dedupeMaxKeys: raw.dedupeMaxKeys ?? DEFAULT_DEDUPE_MAX_KEYS,
|
|
1458
|
+
ignoreMessages: raw.ignoreMessages ?? DEFAULT_IGNORE_MESSAGES,
|
|
1240
1459
|
};
|
|
1241
1460
|
installMiniProgramErrorMonitor(report, options);
|
|
1242
1461
|
}
|
|
@@ -1379,7 +1598,16 @@ function getMiniProgramPagePath() {
|
|
|
1379
1598
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
1380
1599
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
1381
1600
|
const route = (last?.route || last?.__route__);
|
|
1382
|
-
|
|
1601
|
+
if (typeof route !== 'string')
|
|
1602
|
+
return '';
|
|
1603
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1604
|
+
const options = last?.options || {};
|
|
1605
|
+
const keys = Object.keys(options);
|
|
1606
|
+
if (keys.length > 0) {
|
|
1607
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1608
|
+
path = `${path}?${qs}`;
|
|
1609
|
+
}
|
|
1610
|
+
return path;
|
|
1383
1611
|
}
|
|
1384
1612
|
catch {
|
|
1385
1613
|
return '';
|
|
@@ -1642,7 +1870,7 @@ function getMiniProgramDeviceInfo(options) {
|
|
|
1642
1870
|
try {
|
|
1643
1871
|
if (typeof wxAny.getNetworkTypeSync === 'function') {
|
|
1644
1872
|
const n = wxAny.getNetworkTypeSync();
|
|
1645
|
-
out.networkType = n?.networkType ? String(n.networkType) : '';
|
|
1873
|
+
out.networkType = n?.networkType ? String(n.networkType).toUpperCase() : '';
|
|
1646
1874
|
}
|
|
1647
1875
|
else if (typeof wxAny.getNetworkType === 'function') {
|
|
1648
1876
|
// 异步更新:先不阻塞初始化
|
|
@@ -1652,7 +1880,9 @@ function getMiniProgramDeviceInfo(options) {
|
|
|
1652
1880
|
const g = globalThis;
|
|
1653
1881
|
if (!g.__beLinkClsLoggerDeviceInfo__)
|
|
1654
1882
|
g.__beLinkClsLoggerDeviceInfo__ = {};
|
|
1655
|
-
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType
|
|
1883
|
+
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType
|
|
1884
|
+
? String(res.networkType).toUpperCase()
|
|
1885
|
+
: '';
|
|
1656
1886
|
}
|
|
1657
1887
|
catch {
|
|
1658
1888
|
// ignore
|
|
@@ -1671,7 +1901,7 @@ function getMiniProgramDeviceInfo(options) {
|
|
|
1671
1901
|
const g = globalThis;
|
|
1672
1902
|
if (!g.__beLinkClsLoggerDeviceInfo__)
|
|
1673
1903
|
g.__beLinkClsLoggerDeviceInfo__ = {};
|
|
1674
|
-
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType ? String(res.networkType) : '';
|
|
1904
|
+
g.__beLinkClsLoggerDeviceInfo__.networkType = res?.networkType ? String(res.networkType).toUpperCase() : '';
|
|
1675
1905
|
}
|
|
1676
1906
|
catch {
|
|
1677
1907
|
// ignore
|
|
@@ -1712,7 +1942,7 @@ function createMiniDeviceInfoBaseFields(opts) {
|
|
|
1712
1942
|
try {
|
|
1713
1943
|
const g = globalThis;
|
|
1714
1944
|
const extra = g[globalKey];
|
|
1715
|
-
if (extra &&
|
|
1945
|
+
if (extra && typeof extra === 'object')
|
|
1716
1946
|
return { ...base, ...extra };
|
|
1717
1947
|
}
|
|
1718
1948
|
catch {
|
|
@@ -1755,6 +1985,25 @@ class ClsLoggerMini extends ClsLoggerCore {
|
|
|
1755
1985
|
createDeviceInfoBaseFields(options) {
|
|
1756
1986
|
return createMiniDeviceInfoBaseFields(options);
|
|
1757
1987
|
}
|
|
1988
|
+
/**
|
|
1989
|
+
* 小程序版本的可见性监听
|
|
1990
|
+
* - 监听 wx.onAppHide 在应用隐藏时发送日志
|
|
1991
|
+
* - 确保用户关闭小程序或切后台时,队列中的日志不会丢失
|
|
1992
|
+
*/
|
|
1993
|
+
setupVisibilityListener() {
|
|
1994
|
+
const wxAny = globalThis.wx;
|
|
1995
|
+
if (!wxAny || typeof wxAny.onAppHide !== 'function')
|
|
1996
|
+
return;
|
|
1997
|
+
// 避免重复监听
|
|
1998
|
+
const g = globalThis;
|
|
1999
|
+
if (g.__beLinkClsLoggerAppHideInstalled__)
|
|
2000
|
+
return;
|
|
2001
|
+
g.__beLinkClsLoggerAppHideInstalled__ = true;
|
|
2002
|
+
wxAny.onAppHide(() => {
|
|
2003
|
+
// 应用隐藏时立即发送队列中的日志
|
|
2004
|
+
void this.flushBatch();
|
|
2005
|
+
});
|
|
2006
|
+
}
|
|
1758
2007
|
normalize(m) {
|
|
1759
2008
|
const mod = (m?.default && m.default.AsyncClient ? m.default : m);
|
|
1760
2009
|
if (mod?.AsyncClient) {
|
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;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C5B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzC,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE;QACb;;;;WAIG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,yBAAyB;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../src/web/deviceInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","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"}
|