@openreplay/tracker 18.0.13-beta.0 → 18.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.
@@ -53,12 +53,6 @@ export default abstract class Observer {
53
53
  private commitNode;
54
54
  private commitNodes;
55
55
  protected observeRoot(node: Node, beforeCommit: (id?: number) => unknown, nodeToBind?: Node): void;
56
- /**
57
- * [OPENREPLAYDEBUG] Emits a diagnostic line INTO the recorded session's
58
- * console (searchable in replay by "[OPENREPLAYDEBUG]"), NOT the local
59
- * devtools console — used to test capture-loss theories against real traffic.
60
- */
61
- private orDebug;
62
56
  disconnect(): void;
63
57
  protected resetThrottledSetNodeData(): void;
64
58
  }
package/dist/lib/entry.js CHANGED
@@ -3025,8 +3025,7 @@ class Observer {
3025
3025
  }
3026
3026
  }
3027
3027
  catch (mutationErr) {
3028
- const t = mutation.target;
3029
- this.orDebug(`mutation processing threw type=${mutation.type} target=<${t.tagName ?? t.nodeName ?? 'unknown'}>: ${mutationErr?.message ?? String(mutationErr)}`);
3028
+ mutation.target;
3030
3029
  }
3031
3030
  }
3032
3031
  this.commitNodes();
@@ -3248,27 +3247,15 @@ class Observer {
3248
3247
  // TODO: Clean the logic (though now it workd fine)
3249
3248
  if (!hasTag(node, 'html') || !this.isTopContext) {
3250
3249
  if (parent === null) {
3251
- // Sometimes one observation contains attribute mutations for the removimg node, which gets ignored here.
3252
- // That shouldn't affect the visual rendering ( should it? maybe when transition applied? )
3253
- // THEORY: an element silently dropped at commit time (no message emitted).
3254
- if (isElementNode(node)) {
3255
- this.orDebug(`commit drop <${node.tagName}> reason=no-parent`);
3256
- }
3257
3250
  this.unbindTree(node);
3258
3251
  return false;
3259
3252
  }
3260
3253
  parentID = this.app.nodes.getID(parent);
3261
3254
  if (parentID === undefined) {
3262
- if (isElementNode(node)) {
3263
- this.orDebug(`commit drop <${node.tagName}> reason=parent-unbound parent=<${parent.tagName ?? parent.nodeName}>`);
3264
- }
3265
3255
  this.unbindTree(node);
3266
3256
  return false;
3267
3257
  }
3268
3258
  if (!this.commitNode(parentID)) {
3269
- if (isElementNode(node)) {
3270
- this.orDebug(`commit drop <${node.tagName}> reason=parent-commit-failed`);
3271
- }
3272
3259
  this.unbindTree(node);
3273
3260
  return false;
3274
3261
  }
@@ -3412,19 +3399,6 @@ class Observer {
3412
3399
  beforeCommit(this.app.nodes.getID(node));
3413
3400
  this.commitNodes(true);
3414
3401
  }
3415
- /**
3416
- * [OPENREPLAYDEBUG] Emits a diagnostic line INTO the recorded session's
3417
- * console (searchable in replay by "[OPENREPLAYDEBUG]"), NOT the local
3418
- * devtools console — used to test capture-loss theories against real traffic.
3419
- */
3420
- orDebug(message) {
3421
- try {
3422
- this.app.send(ConsoleLog('warn', `[OPENREPLAYDEBUG] ${message}`));
3423
- }
3424
- catch (_) {
3425
- /* diagnostics must never break recording */
3426
- }
3427
- }
3428
3402
  disconnect() {
3429
3403
  // THEORY S3: a disconnect may discard MutationRecords still queued by the
3430
3404
  // browser. takeRecords() drains them — they would be discarded by
@@ -3435,21 +3409,16 @@ class Observer {
3435
3409
  // most reliable for mid-session re-observes (cold-start cycle / iframe).
3436
3410
  const pending = this.observer.takeRecords();
3437
3411
  if (pending.length) {
3438
- let addedEls = 0;
3439
3412
  const tags = [];
3440
3413
  for (const m of pending) {
3441
3414
  for (let i = 0; i < m.addedNodes.length; i++) {
3442
3415
  const n = m.addedNodes[i];
3443
3416
  if (n.tagName) {
3444
- addedEls++;
3445
3417
  if (tags.length < 10)
3446
3418
  tags.push(n.tagName);
3447
3419
  }
3448
3420
  }
3449
3421
  }
3450
- if (addedEls > 0) {
3451
- this.orDebug(`disconnect stranded ${pending.length} pending record(s), ${addedEls} added element(s): ${tags.join(',')}`);
3452
- }
3453
3422
  }
3454
3423
  this.observer.disconnect();
3455
3424
  this.clear();
@@ -4126,7 +4095,7 @@ class App {
4126
4095
  this.stopCallbacks = [];
4127
4096
  this.commitCallbacks = [];
4128
4097
  this.activityState = ActivityState.NotActive;
4129
- this.version = '18.0.13-beta.0'; // TODO: version compatability check inside each plugin.
4098
+ this.version = '18.0.13'; // TODO: version compatability check inside each plugin.
4130
4099
  this.socketMode = false;
4131
4100
  this.compressionThreshold = 24 * 1000;
4132
4101
  this.bc = null;
@@ -5050,16 +5019,6 @@ class App {
5050
5019
  }
5051
5020
  else if (data === 'not_init') {
5052
5021
  this.debug.warn('OR WebWorker: writer not initialised. Restarting tracker');
5053
- // [OPENREPLAYDEBUG] THEORY: a message batch reached the worker before the
5054
- // writer was initialised (start handshake not finished) and was DISCARDED.
5055
- // Surface it into the session (searchable in replay) to test whether
5056
- // startup batches — which can carry the initial DOM snapshot — are lost.
5057
- try {
5058
- this.send(ConsoleLog('warn', '[OPENREPLAYDEBUG] worker not_init: a pre-start message batch was discarded'));
5059
- }
5060
- catch (_) {
5061
- /* diagnostics must never break recording */
5062
- }
5063
5022
  }
5064
5023
  else if (data.type === 'failure') {
5065
5024
  this.stop(false);
@@ -9434,7 +9393,7 @@ class ConstantProperties {
9434
9393
  user_id: this.user_id,
9435
9394
  distinct_id: this.deviceId,
9436
9395
  sdk_edition: 'web',
9437
- sdk_version: '18.0.13-beta.0',
9396
+ sdk_version: '18.0.13',
9438
9397
  timezone: getUTCOffsetString(),
9439
9398
  search_engine: this.searchEngine,
9440
9399
  };
@@ -10136,7 +10095,7 @@ class API {
10136
10095
  this.signalStartIssue = (reason, missingApi) => {
10137
10096
  const doNotTrack = this.checkDoNotTrack();
10138
10097
  console.log("Tracker couldn't start due to:", JSON.stringify({
10139
- trackerVersion: '18.0.13-beta.0',
10098
+ trackerVersion: '18.0.13',
10140
10099
  projectKey: this.options.projectKey,
10141
10100
  doNotTrack,
10142
10101
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,