@multiplayer-app/session-recorder-browser 0.0.11 → 0.0.12

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.
@@ -26457,7 +26457,7 @@ const MULTIPLAYER_BASE_API_URL = 'https://api.multiplayer.app';
26457
26457
  const SESSION_RESPONSE = 'multiplayer-debug-session-response';
26458
26458
  const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
26459
26459
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
26460
- const PACKAGE_VERSION_EXPORT = "0.0.11" || 0;
26460
+ const PACKAGE_VERSION_EXPORT = "0.0.12" || 0;
26461
26461
  // Regex patterns for OpenTelemetry ignore URLs
26462
26462
  const OTEL_IGNORE_URLS = [
26463
26463
  // Traces endpoint
@@ -27613,9 +27613,11 @@ class RecorderBrowserSDK {
27613
27613
  }
27614
27614
  },
27615
27615
  });
27616
+ // It will sent full snapshot again but it will fix missing first snapshot issue
27617
+ rrweb__WEBPACK_IMPORTED_MODULE_6__.record.takeFullSnapshot();
27616
27618
  if (restartTimeout > 0) {
27617
27619
  this.restartTimeout = setTimeout(() => {
27618
- this.restart(sessionId, sessionType);
27620
+ rrweb__WEBPACK_IMPORTED_MODULE_6__.record.takeFullSnapshot();
27619
27621
  }, restartTimeout);
27620
27622
  }
27621
27623
  }
@@ -28061,9 +28063,6 @@ class SessionRecorder {
28061
28063
  this._recorder.init(this._configs);
28062
28064
  }
28063
28065
  if (this.sessionId && (this.sessionState === _types__WEBPACK_IMPORTED_MODULE_3__.SessionState.started || this.sessionState === _types__WEBPACK_IMPORTED_MODULE_3__.SessionState.paused)) {
28064
- if (this.session) {
28065
- this._recorder.subscribeToSession(this.session);
28066
- }
28067
28066
  this._start();
28068
28067
  }
28069
28068
  this._registerWidgetEvents();
@@ -28345,11 +28344,12 @@ class SessionRecorder {
28345
28344
  */
28346
28345
  _start() {
28347
28346
  var _a;
28347
+ this.sessionState = _types__WEBPACK_IMPORTED_MODULE_3__.SessionState.started;
28348
28348
  this._tracer.start(this.sessionId, this.sessionType);
28349
28349
  this._recorder.start(this.sessionId, this.sessionType);
28350
- this.sessionState = _types__WEBPACK_IMPORTED_MODULE_3__.SessionState.started;
28351
28350
  if (this.session) {
28352
28351
  _eventBus__WEBPACK_IMPORTED_MODULE_6__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_4__.SESSION_STARTED_EVENT, this.session);
28352
+ this._recorder.subscribeToSession(this.session);
28353
28353
  this._sessionWidget.seconds = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getTimeDifferenceInSeconds)((_a = this.session) === null || _a === void 0 ? void 0 : _a.startedAt);
28354
28354
  }
28355
28355
  }
@@ -28357,9 +28357,9 @@ class SessionRecorder {
28357
28357
  * Stop tracing and recording for the session
28358
28358
  */
28359
28359
  _stop() {
28360
+ this.sessionState = _types__WEBPACK_IMPORTED_MODULE_3__.SessionState.stopped;
28360
28361
  this._tracer.stop();
28361
28362
  this._recorder.stop();
28362
- this.sessionState = _types__WEBPACK_IMPORTED_MODULE_3__.SessionState.stopped;
28363
28363
  }
28364
28364
  /**
28365
28365
  * Pause the session tracing and recording
@@ -28384,7 +28384,6 @@ class SessionRecorder {
28384
28384
  this._tracer.addBatchSpanExporter(session.tempApiKey);
28385
28385
  this._apiService.updateConfigs({ apiKey: this._configs.apiKey });
28386
28386
  }
28387
- this._recorder.subscribeToSession(session);
28388
28387
  this._setSession(session);
28389
28388
  this._start();
28390
28389
  }