@multiplayer-app/session-recorder-browser 2.0.55 → 2.0.58

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.
@@ -25163,7 +25163,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
25163
25163
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
25164
25164
  const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
25165
25165
  const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
25166
- const PACKAGE_VERSION_EXPORT = "2.0.55" || 0;
25166
+ const PACKAGE_VERSION_EXPORT = "2.0.58" || 0;
25167
25167
  // Regex patterns for OpenTelemetry ignore URLs
25168
25168
  const OTEL_IGNORE_URLS = [
25169
25169
  // Traces endpoint
@@ -28738,8 +28738,8 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
28738
28738
  this._tracer.exportTraces(spans.map((s) => s.span)),
28739
28739
  this._apiService.exportEvents(sessionId, { events: events.map((e) => e.event) }),
28740
28740
  this._apiService.updateSessionAttributes(sessionId, {
28741
- startedAt: new Date(startedAt).toISOString(),
28742
- stoppedAt: new Date(stoppedAt).toISOString(),
28741
+ startedAt: this._toCrashBufferSessionIso(startedAt),
28742
+ stoppedAt: this._toCrashBufferSessionIso(stoppedAt),
28743
28743
  sessionAttributes: this.sessionAttributes,
28744
28744
  resourceAttributes: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getNavigatorInfo)(),
28745
28745
  userAttributes: this._userAttributes || undefined,
@@ -28755,6 +28755,9 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
28755
28755
  _eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_READY_EVENT, sessionId);
28756
28756
  }
28757
28757
  }
28758
+ _toCrashBufferSessionIso(ts) {
28759
+ return new Date(ts - new Date().getTimezoneOffset() * 60 * 1000).toISOString();
28760
+ }
28758
28761
  /**
28759
28762
  * @description Check if session should be started/stopped automatically
28760
28763
  * @param {ISession} [sessionPayload]
@@ -28971,7 +28974,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
28971
28974
  * Start tracing and recording for the session
28972
28975
  */
28973
28976
  _start() {
28974
- var _a;
28977
+ var _a, _b;
28975
28978
  this.sessionState = _types__WEBPACK_IMPORTED_MODULE_4__.SessionState.started;
28976
28979
  // eslint-disable-next-line no-self-assign
28977
28980
  this.sessionType = this.sessionType;
@@ -28980,9 +28983,11 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
28980
28983
  void this._recorder.restart(this.sessionId, this.sessionType);
28981
28984
  this._navigationRecorder.start({ sessionId: this.sessionId, sessionType: this.sessionType });
28982
28985
  if (this.session) {
28983
- _eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_STARTED_EVENT, this.session);
28984
28986
  this._socketService.subscribeToSession(this.session);
28985
28987
  this._sessionWidget.seconds = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getTimeDifferenceInSeconds)((_a = this.session) === null || _a === void 0 ? void 0 : _a.startedAt);
28988
+ if ((_b = this.session) === null || _b === void 0 ? void 0 : _b.url) {
28989
+ _eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_AUTO_CREATED, this.session.url);
28990
+ }
28986
28991
  }
28987
28992
  }
28988
28993
  /**