@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.js CHANGED
@@ -24263,7 +24263,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
24263
24263
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
24264
24264
  const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
24265
24265
  const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
24266
- const PACKAGE_VERSION_EXPORT = "2.0.56" || 0;
24266
+ const PACKAGE_VERSION_EXPORT = "2.0.58" || 0;
24267
24267
  // Regex patterns for OpenTelemetry ignore URLs
24268
24268
  const OTEL_IGNORE_URLS = [
24269
24269
  // Traces endpoint
@@ -27770,8 +27770,8 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
27770
27770
  this._tracer.exportTraces(spans.map((s) => s.span)),
27771
27771
  this._apiService.exportEvents(sessionId, { events: events.map((e) => e.event) }),
27772
27772
  this._apiService.updateSessionAttributes(sessionId, {
27773
- startedAt: new Date(startedAt).toISOString(),
27774
- stoppedAt: new Date(stoppedAt).toISOString(),
27773
+ startedAt: this._toCrashBufferSessionIso(startedAt),
27774
+ stoppedAt: this._toCrashBufferSessionIso(stoppedAt),
27775
27775
  sessionAttributes: this.sessionAttributes,
27776
27776
  resourceAttributes: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getNavigatorInfo)(),
27777
27777
  userAttributes: this._userAttributes || undefined,
@@ -27787,6 +27787,9 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
27787
27787
  _eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_READY_EVENT, sessionId);
27788
27788
  }
27789
27789
  }
27790
+ _toCrashBufferSessionIso(ts) {
27791
+ return new Date(ts - new Date().getTimezoneOffset() * 60 * 1000).toISOString();
27792
+ }
27790
27793
  /**
27791
27794
  * @description Check if session should be started/stopped automatically
27792
27795
  * @param {ISession} [sessionPayload]