@monoscopetech/browser 0.6.0 → 0.6.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/dist/monoscope.min.js +1 -1
- package/dist/monoscope.min.js.map +1 -1
- package/dist/monoscope.umd.js +1 -1
- package/dist/monoscope.umd.js.map +1 -1
- package/dist/replay.js +12 -4
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/replay.js
CHANGED
|
@@ -91,7 +91,9 @@ export class MonoscopeReplay {
|
|
|
91
91
|
this.save();
|
|
92
92
|
}, SAVE_INTERVAL);
|
|
93
93
|
this.isConfigured = true;
|
|
94
|
-
|
|
94
|
+
if (this.config.debug) {
|
|
95
|
+
console.log("MonoscopeReplay configured successfully");
|
|
96
|
+
}
|
|
95
97
|
}
|
|
96
98
|
catch (error) {
|
|
97
99
|
console.error("Failed to configure MonoscopeReplay:", error);
|
|
@@ -106,7 +108,9 @@ export class MonoscopeReplay {
|
|
|
106
108
|
return;
|
|
107
109
|
}
|
|
108
110
|
if (this.events.length > MAX_RETRY_EVENTS) {
|
|
109
|
-
|
|
111
|
+
if (this.config.debug) {
|
|
112
|
+
console.warn(`Event queue exceeded ${MAX_RETRY_EVENTS}, dropping middle events (preserving snapshots)`);
|
|
113
|
+
}
|
|
110
114
|
// Find full snapshot events (type 2) - these are critical for replay
|
|
111
115
|
const fullSnapshots = this.events.filter((e) => e.type === 2);
|
|
112
116
|
const otherEvents = this.events.filter((e) => e.type !== 2);
|
|
@@ -155,7 +159,9 @@ export class MonoscopeReplay {
|
|
|
155
159
|
if (!response.ok) {
|
|
156
160
|
throw new Error(`Failed to save replay events: ${response.status} ${response.statusText}`);
|
|
157
161
|
}
|
|
158
|
-
|
|
162
|
+
if (this.config.debug) {
|
|
163
|
+
console.log(`Successfully saved ${eventsToSend.length} replay events`);
|
|
164
|
+
}
|
|
159
165
|
}
|
|
160
166
|
}
|
|
161
167
|
catch (error) {
|
|
@@ -188,7 +194,9 @@ export class MonoscopeReplay {
|
|
|
188
194
|
window.removeEventListener("pagehide", this.handleUnload);
|
|
189
195
|
document.removeEventListener("visibilitychange", this.handleVisibilityChange);
|
|
190
196
|
this.isConfigured = false;
|
|
191
|
-
|
|
197
|
+
if (this.config.debug) {
|
|
198
|
+
console.log("MonoscopeReplay stopped");
|
|
199
|
+
}
|
|
192
200
|
}
|
|
193
201
|
getEventCount() {
|
|
194
202
|
return this.events.length;
|
package/dist/types.d.ts
CHANGED