@multiplayer-app/session-recorder-browser 2.0.56 → 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.
package/dist/index.umd.js CHANGED
@@ -24436,7 +24436,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
24436
24436
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
24437
24437
  const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
24438
24438
  const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
24439
- const PACKAGE_VERSION_EXPORT = "2.0.56" || 0;
24439
+ const PACKAGE_VERSION_EXPORT = "2.0.58" || 0;
24440
24440
  // Regex patterns for OpenTelemetry ignore URLs
24441
24441
  const OTEL_IGNORE_URLS = [
24442
24442
  // Traces endpoint
@@ -27969,8 +27969,8 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
27969
27969
  this._tracer.exportTraces(spans.map((s) => s.span)),
27970
27970
  this._apiService.exportEvents(sessionId, { events: events.map((e) => e.event) }),
27971
27971
  this._apiService.updateSessionAttributes(sessionId, {
27972
- startedAt: new Date(startedAt).toISOString(),
27973
- stoppedAt: new Date(stoppedAt).toISOString(),
27972
+ startedAt: this._toCrashBufferSessionIso(startedAt),
27973
+ stoppedAt: this._toCrashBufferSessionIso(stoppedAt),
27974
27974
  sessionAttributes: this.sessionAttributes,
27975
27975
  resourceAttributes: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getNavigatorInfo)(),
27976
27976
  userAttributes: this._userAttributes || undefined,
@@ -27986,6 +27986,9 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
27986
27986
  _eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_READY_EVENT, sessionId);
27987
27987
  }
27988
27988
  }
27989
+ _toCrashBufferSessionIso(ts) {
27990
+ return new Date(ts - new Date().getTimezoneOffset() * 60 * 1000).toISOString();
27991
+ }
27989
27992
  /**
27990
27993
  * @description Check if session should be started/stopped automatically
27991
27994
  * @param {ISession} [sessionPayload]