Commit 152a8893 authored by aiduck's avatar aiduck

parent 6ea0ec1e
...@@ -20,6 +20,7 @@ class Monitor { ...@@ -20,6 +20,7 @@ class Monitor {
log, log,
}, },
}); });
this.reset();
this.record(); this.record();
} else { } else {
this.reset({ userIdentifier }); this.reset({ userIdentifier });
......
...@@ -10,17 +10,12 @@ class Reporter { ...@@ -10,17 +10,12 @@ class Reporter {
userIdentifier: "", userIdentifier: "",
path: "", path: "",
}; };
config = {
env: "prod",
log: false,
};
environmentUrl = ""; // 环境配置 environmentUrl = ""; // 环境配置
isUploading = false; // 是否在上传cdn isUploading = false; // 是否在上传cdn
bus = []; // 上传分片数据 bus = []; // 上传分片数据
counter = new Counter(); // 计数器和recordKey一起重置 counter = new Counter(); // 计数器和recordKey一起重置
cache = []; // cdn数据缓存 cache = []; // cdn数据缓存
init({ recordKey, env, log, ...baseInfo }) { init({ env, ...baseInfo }) {
this.recordKey = recordKey;
this.baseInfo = baseInfo; this.baseInfo = baseInfo;
this.setEnvironment(env); this.setEnvironment(env);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment