@qiu_jun/monitors 0.0.7 → 0.0.9

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.
@@ -1,43 +1,30 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = onTiming;
4
- /** 采集并上报页面加载时序(DOMContentLoaded / load) */
2
+
5
3
  function reportTiming() {
6
- let DOMContentLoadedTime = 0;
7
- let loadTime = 0;
8
- // 新版:PerformanceNavigationTiming;旧版降级 performance.timing
9
- if (performance.getEntriesByType) {
10
- const perfEntries = performance.getEntriesByType('navigation');
11
- if (perfEntries.length > 0) {
12
- const navigationEntry = perfEntries[0];
13
- const { domContentLoadedEventStart, loadEventStart, fetchStart } = navigationEntry;
14
- DOMContentLoadedTime = domContentLoadedEventStart - fetchStart;
15
- loadTime = loadEventStart - fetchStart;
16
- }
4
+ let t = 0, e = 0;
5
+ if (performance.getEntriesByType) {
6
+ const n = performance.getEntriesByType("navigation");
7
+ if (n.length > 0) {
8
+ const o = n[0], {domContentLoadedEventStart: i, loadEventStart: r, fetchStart: a} = o;
9
+ t = i - a, e = r - a;
17
10
  }
18
- else {
19
- const { fetchStart, domContentLoadedEventStart, loadEventStart } = performance.timing;
20
- DOMContentLoadedTime = domContentLoadedEventStart - fetchStart;
21
- loadTime = loadEventStart - fetchStart;
22
- }
23
- const log = {
24
- type: 'timing',
25
- DOMContentLoadedTime,
26
- loadTime,
27
- };
28
- console.log('[monitor] timing 上报', log);
29
- this.send(log);
11
+ } else {
12
+ const {fetchStart: n, domContentLoadedEventStart: o, loadEventStart: i} = performance.timing;
13
+ t = o - n, e = i - n;
14
+ }
15
+ const n = {
16
+ type: "timing",
17
+ DOMContentLoadedTime: t,
18
+ loadTime: e
19
+ };
20
+ this.send(n);
30
21
  }
31
- /**
32
- * 监听页面加载时序。
33
- * 若 SDK 在 window.load 之后才初始化,直接补报,避免永远收不到 timing。
34
- */
22
+
35
23
  function onTiming() {
36
- const run = () => reportTiming.call(this);
37
- if (document.readyState === 'complete') {
38
- console.log('[monitor] 页面已 load 完成,立即补报 timing');
39
- run();
40
- return;
41
- }
42
- window.addEventListener('load', run);
24
+ const t = () => reportTiming.call(this);
25
+ "complete" !== document.readyState ? window.addEventListener("load", t) : t();
43
26
  }
27
+
28
+ Object.defineProperty(exports, "__esModule", {
29
+ value: !0
30
+ }), exports.default = onTiming;
@@ -1,6 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = onXHR;
4
+ const businessError_1 = require("../utils/businessError");
5
+ /** 读取 XHR 响应体:responseType 非 text/json 时访问 responseText 会抛 InvalidStateError,读不到返回 undefined */
6
+ function readXhrBody(xhr) {
7
+ try {
8
+ if (xhr.responseType === '' || xhr.responseType === 'text')
9
+ return xhr.responseText;
10
+ return xhr.responseType === 'json' ? xhr.response : undefined;
11
+ }
12
+ catch (_a) {
13
+ return undefined;
14
+ }
15
+ }
4
16
  function onXHR() {
5
17
  const originalXHR = window.XMLHttpRequest;
6
18
  // @ts-ignore
@@ -56,24 +68,47 @@ function onXHR() {
56
68
  startTime: new Date().getTime()
57
69
  });
58
70
  });
59
- // xhr.addEventListener('loadend', function () {
60
- // const duration = new Date().getTime() - startTime
61
- // const status = xhr.status
62
- // const success = status >= 200 && status < 300
63
- // // 对于HTTP错误状态码,也捕获为错误
64
- // if (!success) {
65
- // _this.captureRequest({
66
- // type: 'xhr',
67
- // url: reqUrl,
68
- // method: reqMethod || 'GET',
69
- // msg: `XHR请求失败: 状态码 ${status}`,
70
- // duration,
71
- // status,
72
- // success,
73
- // startTime: new Date().getTime()
74
- // })
75
- // }
76
- // })
71
+ // 请求完成:HTTP >= 400 与业务错误(HTTP 2xx 但响应体 code 非成功)。
72
+ // error/timeout 后 loadend 也会触发,但那时 status 为 0,走不进下面任一分支,不会重复上报
73
+ xhr.addEventListener('loadend', function () {
74
+ var _a;
75
+ const duration = new Date().getTime() - startTime;
76
+ const status = xhr.status;
77
+ const urlStr = String(reqUrl !== null && reqUrl !== void 0 ? reqUrl : '');
78
+ if (_this.endpoint && urlStr === _this.endpoint)
79
+ return;
80
+ // HTTP 层失败(4xx/5xx)
81
+ if (status >= 400) {
82
+ _this.captureRequest({
83
+ type: 'xhr',
84
+ url: reqUrl,
85
+ method: reqMethod || 'GET',
86
+ msg: `XHR请求失败: 状态码 ${status}`,
87
+ duration,
88
+ status,
89
+ success: false,
90
+ startTime
91
+ });
92
+ return;
93
+ }
94
+ // 业务错误:需配置 isBusinessError 才会读响应体判定
95
+ if (status >= 200 && status < 300 && _this.isBusinessError) {
96
+ const business = (0, businessError_1.detectBusinessError)(readXhrBody(xhr), _this.isBusinessError);
97
+ if (business) {
98
+ _this.captureRequest({
99
+ type: 'xhr',
100
+ url: reqUrl,
101
+ method: reqMethod || 'GET',
102
+ msg: `XHR业务错误: ${(_a = business.message) !== null && _a !== void 0 ? _a : urlStr}`,
103
+ duration,
104
+ status,
105
+ success: false,
106
+ business,
107
+ startTime
108
+ });
109
+ }
110
+ }
111
+ });
77
112
  return originalSend.apply(this, arguments);
78
113
  };
79
114
  return xhr;
package/dist/monitor.d.ts CHANGED
@@ -6,6 +6,10 @@ export default class Monitor {
6
6
  endpoint: string;
7
7
  /** 接入项目 projectKey */
8
8
  projectKey: string;
9
+ /** 回放上传地址(fetch 拦截排除用,未开启回放为空) */
10
+ replayEndpoint: string;
11
+ /** 业务错误判定:HTTP 2xx 但响应体 code 非成功时上报(XHR/fetch/wx.request) */
12
+ isBusinessError?: (body: unknown) => boolean;
9
13
  timeoutDuration: number;
10
14
  errorQueue: RequestLog[];
11
15
  requestQueue: RequestLog[];
@@ -14,6 +18,8 @@ export default class Monitor {
14
18
  reporter: ExcReporter;
15
19
  private replay;
16
20
  private readonly options;
21
+ /** errorDedupeMs 去重状态:errorType|message|filename → 上次放行时间 */
22
+ private errorSentAt;
17
23
  originalXHR: {
18
24
  new (): XMLHttpRequest;
19
25
  prototype: XMLHttpRequest;
@@ -32,6 +38,8 @@ export default class Monitor {
32
38
  init(): void;
33
39
  /** 回放初始化:显式开启 + 采样命中 + 回放地址可解析 */
34
40
  private initReplay;
41
+ /** errorDedupeMs 窗口内同类错误(errorType+message+filename 相同)直接丢弃,连回放触发一并跳过;只在放行时刷新时间戳(非滑动窗口),与 minUploadIntervalMs 的节奏一致 */
42
+ private isDuplicateError;
35
43
  /** 统一上报:转异常平台格式 → reporter 批量 POST;错误触发回放切片上传并回填 device.replayId */
36
44
  send(data: MonitorTypeLog): void;
37
45
  /** 手动上报自定义事件 */
package/dist/monitor.js CHANGED
@@ -1,218 +1,181 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const exception_1 = require("./exception");
4
- const modules_1 = require("./modules");
5
- const index_1 = require("./utils/index");
6
- const toExcEvent_1 = require("./utils/toExcEvent");
7
- const replay_1 = require("./replay");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+
7
+ const exception_1 = require("./exception"), modules_1 = require("./modules"), index_1 = require("./utils/index"), toExcEvent_1 = require("./utils/toExcEvent"), replay_1 = require("./replay");
8
+
8
9
  class Monitor {
9
- constructor(options) {
10
- var _a, _b;
11
- /** 异常平台上报地址 */
12
- Object.defineProperty(this, "endpoint", {
13
- enumerable: true,
14
- configurable: true,
15
- writable: true,
16
- value: void 0
17
- });
18
- /** 接入项目 projectKey */
19
- Object.defineProperty(this, "projectKey", {
20
- enumerable: true,
21
- configurable: true,
22
- writable: true,
23
- value: void 0
24
- });
25
- Object.defineProperty(this, "timeoutDuration", {
26
- enumerable: true,
27
- configurable: true,
28
- writable: true,
29
- value: void 0
30
- });
31
- Object.defineProperty(this, "errorQueue", {
32
- enumerable: true,
33
- configurable: true,
34
- writable: true,
35
- value: void 0
36
- });
37
- Object.defineProperty(this, "requestQueue", {
38
- enumerable: true,
39
- configurable: true,
40
- writable: true,
41
- value: void 0
42
- });
43
- Object.defineProperty(this, "maxQueueSize", {
44
- enumerable: true,
45
- configurable: true,
46
- writable: true,
47
- value: void 0
48
- });
49
- Object.defineProperty(this, "sendTimer", {
50
- enumerable: true,
51
- configurable: true,
52
- writable: true,
53
- value: void 0
54
- });
55
- Object.defineProperty(this, "reporter", {
56
- enumerable: true,
57
- configurable: true,
58
- writable: true,
59
- value: void 0
60
- });
61
- Object.defineProperty(this, "replay", {
62
- enumerable: true,
63
- configurable: true,
64
- writable: true,
65
- value: null
66
- });
67
- Object.defineProperty(this, "options", {
68
- enumerable: true,
69
- configurable: true,
70
- writable: true,
71
- value: void 0
72
- });
73
- Object.defineProperty(this, "originalXHR", {
74
- enumerable: true,
75
- configurable: true,
76
- writable: true,
77
- value: void 0
78
- });
79
- Object.defineProperty(this, "originalFetch", {
80
- enumerable: true,
81
- configurable: true,
82
- writable: true,
83
- value: void 0
84
- });
85
- Object.defineProperty(this, "originalOnerror", {
86
- enumerable: true,
87
- configurable: true,
88
- writable: true,
89
- value: void 0
90
- });
91
- this.options = options;
92
- this.endpoint = options.endpoint;
93
- this.projectKey = options.projectKey;
94
- this.timeoutDuration = (_a = options.timeoutDuration) !== null && _a !== void 0 ? _a : 60000;
95
- this.errorQueue = [];
96
- this.requestQueue = [];
97
- this.maxQueueSize = (_b = options.maxQueueSize) !== null && _b !== void 0 ? _b : 10;
98
- this.sendTimer = null;
99
- this.reporter = (0, exception_1.createReporter)({
100
- endpoint: options.endpoint,
101
- projectKey: options.projectKey,
102
- release: options.release,
103
- environment: options.environment,
104
- maxBatch: options.maxBatch,
105
- flushInterval: options.flushInterval,
106
- }, (0, exception_1.makeH5Transport)(options.endpoint));
107
- this.init();
108
- this.initReplay();
109
- this.originalXHR = window.XMLHttpRequest;
110
- this.originalFetch = window.fetch;
111
- this.originalOnerror = window.onerror;
112
- }
113
- init() {
114
- modules_1.onWindowErr.call(this);
115
- modules_1.onLongTask.call(this);
116
- modules_1.onPaint.call(this);
117
- modules_1.onTiming.call(this);
118
- modules_1.onXHR.call(this);
119
- }
120
- /** 回放初始化:显式开启 + 采样命中 + 回放地址可解析 */
121
- initReplay() {
122
- var _a, _b;
123
- const replayOptions = this.options.replay;
124
- if (!(replayOptions === null || replayOptions === void 0 ? void 0 : replayOptions.enabled))
125
- return;
126
- const sampleRate = (_a = replayOptions.sampleRate) !== null && _a !== void 0 ? _a : 1;
127
- if (Math.random() >= sampleRate)
128
- return;
129
- const replayEndpoint = (_b = replayOptions.replayEndpoint) !== null && _b !== void 0 ? _b : (0, replay_1.deriveReplayEndpoint)(this.endpoint);
130
- if (!replayEndpoint) {
131
- console.warn('monitor: replay.replayEndpoint 未配置且无法从 endpoint(需以 /report 结尾)推导,回放已禁用');
132
- return;
133
- }
134
- this.replay = new replay_1.ReplayController({
135
- replayEndpoint,
136
- projectKey: this.projectKey,
137
- bufferSeconds: replayOptions.bufferSeconds,
138
- maxUploadsPerSession: replayOptions.maxUploadsPerSession,
139
- minUploadIntervalMs: replayOptions.minUploadIntervalMs,
140
- maxReplayBytes: replayOptions.maxReplayBytes,
141
- captureRequest: replayOptions.captureRequest,
142
- maskTextClass: replayOptions.maskTextClass,
143
- });
144
- void this.replay.start();
145
- }
146
- /** 统一上报:转异常平台格式 → reporter 批量 POST;错误触发回放切片上传并回填 device.replayId */
147
- send(data) {
148
- var _a;
149
- const baseData = (0, index_1.getLogBaseData)();
150
- const events = (0, toExcEvent_1.toExcEvents)(data, baseData, this.options);
151
- const replayId = (_a = this.replay) === null || _a === void 0 ? void 0 : _a.captureIfTriggered(data);
152
- if (replayId) {
153
- for (const event of events)
154
- event.device = { ...event.device, replayId };
155
- }
156
- for (const event of events)
157
- this.reporter.capture(event);
158
- }
159
- /** 手动上报自定义事件 */
160
- capture(event) {
161
- this.reporter.capture(event);
162
- }
163
- reportRequest() {
164
- if (this.requestQueue.length === 0)
165
- return;
166
- this.send({ type: 'batchXHR', requests: [...this.requestQueue] });
167
- this.requestQueue = [];
168
- }
169
- reportError() {
170
- if (this.errorQueue.length === 0)
171
- return;
172
- this.send({ type: 'batchXHR', requests: [...this.errorQueue] });
173
- this.errorQueue = [];
174
- }
175
- captureRequest(requestInfo) {
176
- var _a;
177
- const validRequestTypes = ['xhr', 'fetch'];
178
- if (!requestInfo.type || !validRequestTypes.includes(requestInfo.type)) {
179
- console.warn(`监控系统: 无效的请求类型 ${requestInfo.type},无法上报`);
180
- return;
181
- }
182
- if ((0, toExcEvent_1.isExceptionReportUrl)(String((_a = requestInfo.url) !== null && _a !== void 0 ? _a : ''), this.endpoint))
183
- return;
184
- const requiredFields = ['url', 'method', 'duration', 'status', 'success', 'startTime'];
185
- for (const field of requiredFields) {
186
- if (requestInfo[field] === undefined) {
187
- console.warn(`监控系统: 请求信息中缺少必填字段 ${field},无法上报`);
188
- return;
189
- }
190
- }
191
- requestInfo.page = window.location.href;
192
- this.requestQueue.push(requestInfo);
193
- if (this.requestQueue.length >= this.maxQueueSize)
194
- this.reportRequest();
195
- }
196
- sendQueuedData() {
197
- if (this.errorQueue.length > 0)
198
- this.reportError();
199
- if (this.requestQueue.length > 0)
200
- this.reportRequest();
201
- }
202
- destroy() {
203
- var _a;
204
- (_a = this.replay) === null || _a === void 0 ? void 0 : _a.stop();
205
- this.sendQueuedData();
206
- this.reporter.destroy();
207
- window.XMLHttpRequest = this.originalXHR;
208
- window.fetch = this.originalFetch;
209
- window.onerror = this.originalOnerror;
210
- if (this.sendTimer) {
211
- clearInterval(this.sendTimer);
212
- this.sendTimer = null;
213
- }
214
- this.errorQueue = [];
215
- this.requestQueue = [];
216
- }
10
+ constructor(e) {
11
+ var r, t;
12
+ Object.defineProperty(this, "endpoint", {
13
+ enumerable: !0,
14
+ configurable: !0,
15
+ writable: !0,
16
+ value: void 0
17
+ }), Object.defineProperty(this, "projectKey", {
18
+ enumerable: !0,
19
+ configurable: !0,
20
+ writable: !0,
21
+ value: void 0
22
+ }), Object.defineProperty(this, "replayEndpoint", {
23
+ enumerable: !0,
24
+ configurable: !0,
25
+ writable: !0,
26
+ value: ""
27
+ }), Object.defineProperty(this, "isBusinessError", {
28
+ enumerable: !0,
29
+ configurable: !0,
30
+ writable: !0,
31
+ value: void 0
32
+ }), Object.defineProperty(this, "timeoutDuration", {
33
+ enumerable: !0,
34
+ configurable: !0,
35
+ writable: !0,
36
+ value: void 0
37
+ }), Object.defineProperty(this, "errorQueue", {
38
+ enumerable: !0,
39
+ configurable: !0,
40
+ writable: !0,
41
+ value: void 0
42
+ }), Object.defineProperty(this, "requestQueue", {
43
+ enumerable: !0,
44
+ configurable: !0,
45
+ writable: !0,
46
+ value: void 0
47
+ }), Object.defineProperty(this, "maxQueueSize", {
48
+ enumerable: !0,
49
+ configurable: !0,
50
+ writable: !0,
51
+ value: void 0
52
+ }), Object.defineProperty(this, "sendTimer", {
53
+ enumerable: !0,
54
+ configurable: !0,
55
+ writable: !0,
56
+ value: void 0
57
+ }), Object.defineProperty(this, "reporter", {
58
+ enumerable: !0,
59
+ configurable: !0,
60
+ writable: !0,
61
+ value: void 0
62
+ }), Object.defineProperty(this, "replay", {
63
+ enumerable: !0,
64
+ configurable: !0,
65
+ writable: !0,
66
+ value: null
67
+ }), Object.defineProperty(this, "options", {
68
+ enumerable: !0,
69
+ configurable: !0,
70
+ writable: !0,
71
+ value: void 0
72
+ }), Object.defineProperty(this, "errorSentAt", {
73
+ enumerable: !0,
74
+ configurable: !0,
75
+ writable: !0,
76
+ value: new Map
77
+ }), Object.defineProperty(this, "originalXHR", {
78
+ enumerable: !0,
79
+ configurable: !0,
80
+ writable: !0,
81
+ value: void 0
82
+ }), Object.defineProperty(this, "originalFetch", {
83
+ enumerable: !0,
84
+ configurable: !0,
85
+ writable: !0,
86
+ value: void 0
87
+ }), Object.defineProperty(this, "originalOnerror", {
88
+ enumerable: !0,
89
+ configurable: !0,
90
+ writable: !0,
91
+ value: void 0
92
+ }), this.options = e, this.endpoint = e.endpoint, this.projectKey = e.projectKey,
93
+ this.isBusinessError = e.isBusinessError, this.timeoutDuration = null !== (r = e.timeoutDuration) && void 0 !== r ? r : 6e4,
94
+ this.errorQueue = [], this.requestQueue = [], this.maxQueueSize = null !== (t = e.maxQueueSize) && void 0 !== t ? t : 10,
95
+ this.sendTimer = null, this.originalXHR = window.XMLHttpRequest, this.originalFetch = window.fetch,
96
+ this.originalOnerror = window.onerror, this.reporter = (0, exception_1.createReporter)({
97
+ endpoint: e.endpoint,
98
+ projectKey: e.projectKey,
99
+ release: e.release,
100
+ environment: e.environment,
101
+ maxBatch: e.maxBatch,
102
+ flushInterval: e.flushInterval
103
+ }, (0, exception_1.makeH5Transport)(e.endpoint)), this.init(), this.initReplay();
104
+ }
105
+ init() {
106
+ modules_1.onWindowErr.call(this), modules_1.onLongTask.call(this), modules_1.onPaint.call(this),
107
+ modules_1.onTiming.call(this), modules_1.onXHR.call(this), modules_1.onFetch.call(this);
108
+ }
109
+ initReplay() {
110
+ var e, r;
111
+ const t = this.options.replay;
112
+ if (!(null == t ? void 0 : t.enabled)) return;
113
+ const i = null !== (e = t.sampleRate) && void 0 !== e ? e : 1;
114
+ if (Math.random() >= i) return;
115
+ const o = null !== (r = t.replayEndpoint) && void 0 !== r ? r : (0, replay_1.deriveReplayEndpoint)(this.endpoint);
116
+ o && (this.replayEndpoint = o, this.replay = new replay_1.ReplayController({
117
+ replayEndpoint: o,
118
+ projectKey: this.projectKey,
119
+ bufferSeconds: t.bufferSeconds,
120
+ maxUploadsPerSession: t.maxUploadsPerSession,
121
+ minUploadIntervalMs: t.minUploadIntervalMs,
122
+ maxReplayBytes: t.maxReplayBytes,
123
+ captureRequest: t.captureRequest,
124
+ maskTextClass: t.maskTextClass
125
+ }), this.replay.start());
126
+ }
127
+ isDuplicateError(e) {
128
+ var r, t;
129
+ const i = null !== (r = this.options.errorDedupeMs) && void 0 !== r ? r : 0;
130
+ if (i <= 0 || "error" !== e.type) return !1;
131
+ const o = `${e.errorType}|${e.message}|${null !== (t = e.filename) && void 0 !== t ? t : ""}`, n = Date.now(), s = this.errorSentAt.get(o);
132
+ if (void 0 !== s && n - s < i) return !0;
133
+ if (this.errorSentAt.size >= 100) for (const [e, r] of this.errorSentAt) n - r >= i && this.errorSentAt.delete(e);
134
+ return this.errorSentAt.set(o, n), !1;
135
+ }
136
+ send(e) {
137
+ var r;
138
+ if (this.isDuplicateError(e)) return;
139
+ const t = (0, index_1.getLogBaseData)(), i = (0, toExcEvent_1.toExcEvents)(e, t, this.options), o = null === (r = this.replay) || void 0 === r ? void 0 : r.captureIfTriggered(e);
140
+ if (o) for (const e of i) e.device = {
141
+ ...e.device,
142
+ replayId: o
143
+ };
144
+ for (const e of i) this.reporter.capture(e);
145
+ }
146
+ capture(e) {
147
+ this.reporter.capture(e);
148
+ }
149
+ reportRequest() {
150
+ 0 !== this.requestQueue.length && (this.send({
151
+ type: "batchXHR",
152
+ requests: [ ...this.requestQueue ]
153
+ }), this.requestQueue = []);
154
+ }
155
+ reportError() {
156
+ 0 !== this.errorQueue.length && (this.send({
157
+ type: "batchXHR",
158
+ requests: [ ...this.errorQueue ]
159
+ }), this.errorQueue = []);
160
+ }
161
+ captureRequest(e) {
162
+ var r;
163
+ if (!e.type || ![ "xhr", "fetch" ].includes(e.type)) return;
164
+ if ((0, toExcEvent_1.isExceptionReportUrl)(String(null !== (r = e.url) && void 0 !== r ? r : ""), this.endpoint)) return;
165
+ const t = [ "url", "method", "duration", "status", "success", "startTime" ];
166
+ for (const r of t) if (void 0 === e[r]) return;
167
+ e.page = window.location.href, this.requestQueue.push(e), this.requestQueue.length >= this.maxQueueSize && this.reportRequest();
168
+ }
169
+ sendQueuedData() {
170
+ this.errorQueue.length > 0 && this.reportError(), this.requestQueue.length > 0 && this.reportRequest();
171
+ }
172
+ destroy() {
173
+ var e;
174
+ null === (e = this.replay) || void 0 === e || e.stop(), this.sendQueuedData(), this.reporter.destroy(),
175
+ window.XMLHttpRequest = this.originalXHR, window.fetch = this.originalFetch, window.onerror = this.originalOnerror,
176
+ this.sendTimer && (clearInterval(this.sendTimer), this.sendTimer = null), this.errorQueue = [],
177
+ this.requestQueue = [], this.errorSentAt.clear();
178
+ }
217
179
  }
218
- exports.default = Monitor;
180
+
181
+ exports.default = Monitor;